You need to sign in to do that
Don't have an account?
Radha Rathinavel Pandian
Trigger to redirect the page
Hi,
My requirement was to redirect my page after the record gets saved without using VF page,
I am using Case object here. I need to send an agreement using custsom url, So Here What I needed is to redirect to the custom url when the records gets submitted. Please assist me.
My requirement was to redirect my page after the record gets saved without using VF page,
I am using Case object here. I need to send an agreement using custsom url, So Here What I needed is to redirect to the custom url when the records gets submitted. Please assist me.
I think you are using Visualforce page to send the agreement and there you want to redirect the page.
So you can use following code in your class to redirect on another page
OR
You can do same redirection on Visualforce page using JavaScript with OnComplete attribute of Visualforce Component.
Your JavaScript code will be like This. And call this method from onComplete attribute. for example.
Regards,
Yogesh
All Answers
- Redirect after a new record is saved from Trigger please refer the below link for reference.
- https://salesforce.stackexchange.com/questions/36311/redirect-after-a-new-record-is-save-from-trigger
hope it helps.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
You can achieve this by adding extra parameter in the URL.
Example:
When you edit or create the records, Normally your URL like this.
https://ap5.salesforce.com/0037F00000JYwIf/e?retURL=%2F0037F00000JYwIf&_CONFIRMATIONTOKEN=VmpFPSxNakF4T0Mwd01pMHdNbFF3T0RvMU1qbzBPUzQwTWpKYSxWamdWa0VFVVRyN2R5MDVJblMxZWs1LE56QmpOemN3&common.udd.actions.ActionsUtilORIG_URI=%2F0037F00000JYwIf%2Fe
As a standard way, when you click on the save button it will redirect to the record level.
But by using &saveURL= parameter you can override the standard save button redirection. Your URL will be like this
https://ap5.salesforce.com/0037F00000JYwIf/e?
retURL=%2F0037F00000JYwIf&_CONFIRMATIONTOKEN=VmpFPSxNakF4T0Mwd01pMHdNbFF3T0RvMU1qbzBPUzQwTWpKYSxWamdWa0VFVVRyN2R5MDVJblMxZWs1LE56QmpOemN3&common.udd.actions.ActionsUtilORIG_URI=%2F0037F00000JYwIf%2Fe&saveURL=001
Please mark this answer as SOLVED and BEST ANSWER if it helps you.
Regards,
Yogesh More
Salesforce consultant || Salesforce Developer
more.yogesh422@gmail.com || Skype:-yogesh.more44
I am integrating adobe esign with my application so the custom button created to send an agreement with the hep of below url,
/apex/echosign_dev1__AgreementTemplateProcess?masterId={!Case.Id}&templateID=a071I000002qEJN
So here What I required is to automate this link to redirect when my case object records gets saved
I think you are using Visualforce page to send the agreement and there you want to redirect the page.
So you can use following code in your class to redirect on another page
OR
You can do same redirection on Visualforce page using JavaScript with OnComplete attribute of Visualforce Component.
Your JavaScript code will be like This. And call this method from onComplete attribute. for example.
Regards,
Yogesh
Component:
Js Controller:
Go ahead and drop this component on the record page of any object. You will be redirected to the given URL in case of any change.
Please note that we can add any conditional statement in the 'onChange' function of the controller.
You'll also need to add the urlEvent.fire(); command to the JsController to actually launch the link.
I'm actually looking to have this event fire upon a field change, any ideas on how I could do that?
The component doesn't have the ability to perform an ISCHANGED formula field, so I'm a bit lost here.
Thank you!