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
SFDC coderSFDC coder 

redirect to VF page using URLFOR()

hi all,

1.After a button click on VF,a standard create page opens up.
2.After the record is save,i want the user to redirect back to the VF page it had come from

How do i do that?

Any help is appreciated
Thanks
 
RamuRamu (Salesforce Developers) 
See if this post helps

https://developer.salesforce.com/forums/ForumsMain?id=906F000000098jvIAA
SFDC coderSFDC coder
hi ramu,

Thanks for your reply
but how do i write the retURL parameter?as i need to go back to the VF page from where i had come from
Brian FordBrian Ford
All you need to do is add the VF page name in the retURL

retURL='/VFPageName?={recordId}'
SFDC coderSFDC coder
hi brian,

How do i implement your solution in my code?
below is my code
 
<apex:commandButton value="Add Killer Checks" action="{!URLFOR($Action.DisplayCheck__c.New,null,[CF00N20000009H4jV=vname,CF00N20000009H4jV_lkid=vname],true)}" style="float:center"/>

THanks