Activity Forums Salesforce® Discussions How to fetch record id using Salesforce instance URL address?

  • How to fetch record id using Salesforce instance URL address?

    Posted by Deepak on October 11, 2019 at 1:00 pm

    How to fetch record id using Salesforce instance URL address?

    Laveena replied 5 years ago 2 Members · 1 Reply
  • 1 Reply
  • Laveena

    Member
    October 11, 2019 at 1:09 pm

    Hi Deepak,

    I guess you can use the string methods now to pull the ID.

    BrowserURL=BrowserURL.right(15);//Pull from right the 15 digit Id
    If your org is not update to winter 13 then you can use String.Split('/') and get the last array element value .

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Salesforce Admin Certification 2020 Questions Explained with References - Part II

Video in

How to prepare and pass Salesforce Admin Certification with Practice Exam Questions 2020 practice questions and answers for the Salesforce Administration Salesforce Certified Admin Exam Questions Salesforce Administrator Certification Exam…