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
VisionaryVisionary 

Need visualforce page to redirect to standard page but append an extra field/value in url

Hi all,

 

This is driving me nuts, i believe what i need is a very simple VF page but can't seem to get anywhere

 

i need to create a custom edit button that would point to a VF page.

This VF page would then redirect back to the standard page but would append an extra value to the URL

 

 .....salesforce.com/a0wW0000000Dzl5/e?retURL=%2Fa0wW0000000Dzl5&x=somevalue

 

anyone seen/done something like this? I would really appreciate if you could post some code i could start with..

 

 

 

 

SRKSRK
Try this

public Pagereference save1()
{
Pagereference pegref = new Pagereference('/'+RecordId);
pegref.getparameter.put('x',<value of x>);
pegref.setRedirect(true);
return pegref;
}
venkatsforcevenkatsforce
 <apex:commandButton id="aid" action="{!URLFOR($Action.Account.view, acc.id)}" value="Edit"></apex>
Use this apex code in your command button its redirect to satndardpage