Activity Forums Salesforce® Discussions Is it at all possible to pass a parameter through a URL to an input field on a Visualforce page?

  • Nitish

    Member
    April 30, 2016 at 8:20 am

    Hi Danna

    you can input your parameter via URL like ap2.salesforce.com/vfPages?id=01Z90000000EkUk for example

    and you can add this Id testId = ApexPages.CurrentPage().getparameters().get('id') to get the parameter from url then you can put the testId to hidden input field that you want

  • Parul

    Member
    September 5, 2018 at 1:35 pm

    Hi Danna

    Yes we can get a parameter value from URL of VisuaforcePage.

    Foe this you have to extract this value through instance in URL

    e.g. if instance of URL is

    ap4.salesforce.com/myPages?requiredvalue=Salesforce

    Then use

    String myValue = ApexPages.CurrentPage().getparameters().get(‘requiredvalue’);

    And here you have your value

    Thanks

  • shariq

    Member
    September 15, 2018 at 2:08 am

    Hi,

    Just take out the value from URL and assign it to getter setter variable and use it on your visualforce page like -

    String getterSetterVar {get;set;}

    getterSetterVar = ApexPages.CurrentPage().getparameters().get('URLParameter');

    Hope it helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…