Results 1 to 4 of 4

Thread: logic hook redirect to email editor

  1. #1
    marklark is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    Colorado Springs, USA
    Posts
    29

    Default logic hook redirect to email editor

    When a status field is changed on a Contact, I need to redirect the user to an email editor.

    I can detect the change in a 'before_save' logic hook.

    I put a value in the $bean that is detected by the 'after_save' logic hook.

    In the 'after_save' hook I check the status value and find the email template that goes with that status.

    How do I open the email module with this template?

    I'm trying this:

    PHP Code:
       if ( $bean->lead_status_changed ) {
          
    SugarApplication::redirect("index.php?module=Emails&email_template1=c1b5e3e8-2a69-4b5c-efa7-4da61d46eafd");
        } 
    but that doesn't open the editor and the template isn't in the 'Compose' section when I click to get there.
    Last edited by marklark; 2011-04-14 at 07:46 PM. Reason: to turn on the notification

  2. #2
    marklark is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    Colorado Springs, USA
    Posts
    29

    Default Re: logic hook redirect to email editor

    a little bit of progress...

    PHP Code:
    SugarApplication::redirect("index.php?module=Emails&action=Compose"); 
    takes me to the email editor.

  3. #3
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: logic hook redirect to email editor

    Hello,

    Try following,

    PHP Code:
    SugarApplication::redirect("index.php?module=Emails&action=Compose&template_id=c1b5e3e8-2a69-4b5c-efa7-4da61d46eafd"); 
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  4. #4
    marklark is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    Colorado Springs, USA
    Posts
    29

    Default Re: logic hook redirect to email editor

    thanks, but 'template_id' doesn't seem to work...

    It's nice that the URLs can be tested directly in the browser.

    I'm having trouble finding possible parameters in the modules/Emails/Email.php and modules/Emails/EmailUI.php files... :^/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Set email opt out flag in logic hook
    By robertbmirth in forum Developer Help
    Replies: 7
    Last Post: 2010-08-03, 06:50 PM
  2. email logic hook
    By cs3gallery in forum Developer Help
    Replies: 12
    Last Post: 2010-06-11, 03:20 PM
  3. Problem with SugarApplication::redirect() in logic hook
    By rcastro in forum Developer Help
    Replies: 8
    Last Post: 2010-04-26, 01:56 PM
  4. Redirect in save Logic Hook
    By Mithun in forum Developer Help
    Replies: 10
    Last Post: 2009-12-03, 02:43 AM
  5. Redirect the browser from a logic hook after QuickCreate
    By dkelly in forum Developer Tutorials
    Replies: 0
    Last Post: 2009-04-09, 01:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •