function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HarrySieHarrySie 

retUrl not redirecting to new created object

Hi,

 

I've written a Visualforce page that creates a new customobject and directs the user to the newly created objects edit page. In the PageReference I have also provided the retUrl. The called URL looks exactly like the one, if I click the standard edit Button. However when saving or cancelling the Editpage which is called by the Visualforce page the system redirects the user to the Home Page.

 

Thanks for your help

 

Harald

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox
Try using "saveURL" instead of "retURL". Also, you need to provide a "cancelURL".

All Answers

sfdcfoxsfdcfox
Try using "saveURL" instead of "retURL". Also, you need to provide a "cancelURL".
This was selected as the best answer
HarrySieHarrySie

Thanks very much! That did the trick. I thought retUrl being the right for that. Do I need retUrl then? For which action on the edit page is the retURL?

 

Thanks

Harald