You need to sign in to do that
Don't have an account?

How to get URL Parameter in Visualforce Page
Hi,
I'm redirecting to new visualforce page in my class.
created URL look like.
https://xxx.visual.force.com/apex/NewPage?TestValue=value1&retURL=a0HS000000450UD
I'm trying to get TestValue into my Visualforce Page...
code of Page is here..
<apex:page standardController="XXX__c" extensions="EEE_Test">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1">
<apex:inputField value="{!CurrentPage.parameters.TestValue}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I'm getting "Save error: Field parameters does not exist. Check spelling." during saving this page.
Please suggest how to get value from the URL in page InputField?
Replace your code with the syntax given below :
<apex:inputField value="{!$CurrentPage.parameters.Paramtervalue}"/>
Hope this helps.
All Answers
I believe you can use $CurrentPage.parameters.parametername
Replace your code with the syntax given below :
<apex:inputField value="{!$CurrentPage.parameters.Paramtervalue}"/>
Hope this helps.
Thanks Pradeep!!!!
Hi, I am using same syntax but still getting error, pl help
<apex:inputField value="{!$CurrentPage.Parameters.id}"/>
Hi Sanjivani,
Use inputText instead of inputField and you'll be good to go.
inputFields need to be bound to (i.e., to reference) sObject fields.
inputText creates a standard HTML field; no special binding there.
Shane
Hi you must use <apex:inputField value="{!$CurrentPage.parameters.TestValue}"/> instead of <apex:inputField value="{!CurrentPage.parameters.TestValue}"/> as parameter is global resource
https://c.xxx.visual.force.com/apex/CaseVehicles?CaseNum=252899
<apex:inputField value="{!Case_Vehicle__c.VIN__c}"/>
<apex:inputText value="{!$CurrentPage.parameters.CaseNum}"/>
<apex:inputField value="{!Case_Vehicle__c.Color__c}"/>
I tried <inputField value = > as well
Gives me the same error as above.
<apex:inputText value="{!$CurrentPage.Parameters.billingStreet}"/>