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
Sandra OSandra O 

Passing values to a VF Page via a Custom URL

Hello-

I know you can normally use a controller to do this - but I want to pass values from my custom button to my VF page.  AS of right now - I am unable to get the Priority field to show "High."

Any help?

Here is my custom button:
/apex/EscalateIncident?&id={!Incidents__c.Id}&00Nn0000000Pp0u=High&retURL=%2F{!Incidents__c.Id}



Here is my VF Page:
<apex:page standardController="Incidents__c">
    <apex:form >
        <apex:pageBlock title="Escalation Notes: {!Incidents__c.Name}">
            <apex:pageBlockSection title="Escalation Notes" columns="1">
                <apex:inputField value="{!Incidents__c.Escalation_Notes__c}"/>
                <apex:outputField value="{!Incidents__c.Priority__c}"/>
                
            </apex:pageBlockSection>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 
Vidya DVidya D
On Custom Button choose  Content Source to URL and form the URL  with the parameters that you want to send.
Use appropriate behavior.

You can set the same above URL for your content source

/apex/EscalateIncident?&id={!Incidents__c.Id}&00Nn0000000Pp0u=High&retURL=%2F{!Incidents__c.Id}
Sandra OSandra O
Thanks for responding Vidya.

WHere can I choose Content Soruce?  I don't see that available.

 
Vidya DVidya D
From Custom Object, go to Buttons & Links, click on Edit for your new custom button.
Refer this help Link

https://help.salesforce.com/HTViewHelpDoc?id=defining_custom_links_fields.htm&language=en_US

 
Sandra OSandra O
these are my current settings

User-added image