You need to sign in to do that
Don't have an account?
Vintara
!save action and retURL help required.
So I have an APEX page that uses a sandardcontroller and the {!save} action. However, when a save is performed the user is take to the object record view rather then the retURL. How can I redirect the user to the correct page after performing a save action?
All Answers
Hey
How are you specifying the retUrl?
Wes
I wonder if this is a bug? I am having the same trouble. The following formula, as an "onclick javascript" custom button, correctly opens and prepopulates a new purchase_items__c, but when I press "save", I am taken to the new item rather than to the containing purchase order.
I'm sure that the retURL is correct, because the cancel button does take me back to the purchase order.
Here's the formula (I added spaces here for readability; it seems they must be removed for the formula to work):
navigateToUrl('{!URLFOR($Action.SFDC_Purchase_Items__c.New,null,
[retURL=URLFOR($Action.SFDC_Purchase_Order__c.View,SFDC_Purchase_Order__c.Id),
CF00N200000014eaJ=SFDC_Purchase_Order__c.Name,
CF00N200000014eaJ_lkid=SFDC_Purchase_Order__c.Id]
)}')