When directing a user from a Skuid screen to the SF send email screen you can redirect the user back to the Skuid screen if Cancel is selected with this URL script:
" /_ui/core/email/author/EmailAuthor?p2_lkid={{{$Model.Case.data.0.ContactId}}}&p3_mlktp=500&p3_lkid={{{$Model.Case.data.0.Id}}}&retURL=/apex/ui?page=GBC_Case_View%26id%3D{{$Model.Case.data.0.Id}}"
BUT
When the user selects send then SF directs you to the Object record view and ignores any retURL command!
Is there a way to redirect the user back to a Skuid page after the user selects Send Email?
That would be slick. I’ve been forcing the email to open in a new window, and encouraging users to close the window after the email sends. Perhaps there’s a way to have the window close automatically after send?
It looks to me like the “saveURL” parameter works with the email composer tool. Your url redirect code would look somthing like this:
/_ui/core/email/author/EmailAuthor?p2_lkid={{{$Model.Case.data.0.ContactId}}}&p3_mlktp=500&p3_lkid={{{$Model.Case.data.0.Id}}}&retURL=%2Fapex%2Fui%3Fpage%3DGBC_Case_View%2526id%253D{{$Model.Case.data.0.Id}}&saveURL=URLEncoded_Page_Destination
Note. You have not URL encoded the full link for your RetUrl above, which will cause things to break. I’m guessing that the RetURL in your email page is not what you expect. Take the address you want to send the user to (in a retURL or a saveURL and go to http://meyerweb.com/eric/tools/dencoder/ to get an encoded version.
Hey Rob. Thanks a ton. I was missing the &saveURL piece
The script now looks like this:
/_ui/core/email/author/EmailAuthor?p2_lkid={{{$Model.Case.data.0.ContactId}}}&p3_mlktp=500&p3_lkid={{{$Model.Case.data.0.Id}}}&retURL=%2Fapex%2Fskuid__ui?page=GBC_Case_View%26id%3D{{$Model.Case.data.0.Id}}&saveURL=%2Fapex%2Fskuid__ui?page=GBC_Case_View%26id%3D{{$Model.Case.data.0.Id}}
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.