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
babloo123babloo123 

Custom Object Home page issue

I have a scenario where my custom object record standard page when edited and saved moves back to home page instead of staying back on detail page. Can some one guide how to solve this issue.
BalajiRanganathanBalajiRanganathan
I assume you have not overriden and not created custom controller or extension for edit operation.

what is the url in the browser address bar after clicking on edit (and before clicking on save)? does it have retUrl=<id> of the record in it?
 
babloo123babloo123
pageRef = new PageReference('/'+recdID+'/e?nooverride=1retURL=%2Fa'+recdID);

I am using this I want the ovverride and return URl both can you guide me how to correct
BalajiRanganathanBalajiRanganathan
Are u using this above for Edit? then pageRef = new PageReference('/'+recdID+'/e?nooverride=1&retURL='+recdID);
for Save, it will be pageRef = new PageReference('/'+recdID+'?nooverride=1');
babloo123babloo123
Thx a lot it did work