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
sapsap 

Problem with retURL

Hi,
 
I have requirement where im passing some values through an url to create a record of an custom object(lets assume this custom object as X).
After saving the record i want to redirect to a record of another custom object(ie. Y) which has X in its related list.
 
Im able to redirect to the edit page of X but after saving it is not getting redirected to Y record.Im using retURL but it does not seems to be working.
 
Im using the following code.Here reRecId is the Id of the Y object record.
 
parent.frames.location.replace("/a0u/e?CF00NT0000000rdmi="+raName+"&CF00NT0000000rdmi_lkid="+reRecId+"&00NT0000000s3Rp="+proName+"&00NT0000000rnJB="+warehouse+"&00NT0000000rnO3="+ucost+"&cancelURL=%2F{!SOLS_Inventory__c.Id}&retURL=%2F"+reRecId)
 
Can any one tell me whats wrong in my code.
I tried replacing %2F with '/' but it was of no use.
 
Any help will be appreciated.
 
Thanks in Advance.
hemmhemm
I have tried to do something similar (see here) without any success.  It seems that if you pass in the retURL to a page, it gets overwritten by Salesforce somewhere along the way.
sapsap

Thanks for your reply.

Is there any work around for this.

Any pointers will be of great help.

Greg HGreg H
Try passing "&save_new_url=" in the URL.  I think this will get you what you want.
-greg