0

Is it possible to fetch the user field values by using URL Hacking?

https://domain.cs69.my.salesforce.com/a0s/e?retURL=%2Fa0s%2Fo&RecordType=012o0000123pEji&00No0000005nae4={$User.Phone}

I am trying to auto-populate user phone number directly into one of the custom object field. I am sure we can do this Using URL hack but not sure what is wrong here?

7
  • From where you are redirecting this link ? Aug 9, 2018 at 13:55
  • From JavaScript button
    – Prince
    Aug 9, 2018 at 13:57
  • What is the exact problem you are facing here ? Is it not populating ? Did you checked this 00No0000005nae4 is correct? Aug 9, 2018 at 14:50
  • Are you loading a new page when you hit this javascript button ?
    – Dave
    Aug 9, 2018 at 14:56
  • yes , i am opening new page after clicking the JavaScript button,
    – Prince
    Aug 9, 2018 at 15:07

1 Answer 1

0

You can get URL parameters using

ApexPages.currentPage().getParameters().get('myParamName')

Here is the documentation: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_System_PageReference_getParameters.htm

1
  • 1
    This is not an Apex application. The question is about URL hacking in a JavaScript button.
    – David Reed
    Aug 9, 2018 at 15:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .