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
SFDC_BeginnersSFDC_Beginners 

Short cut to find out the Current records Id

Hi All,

 

Do we a short cut to find out the current records id from the UI?

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
Chris DaviesChris Davies

There are different ways you can access the record id

 

Sttandard UI:

 

The record is normally displayed in the url

 

Example:

 

Url

https://na14.salesforce.com/001d000000Ar3CM

 

Record id:

001d000000Ar3CM

 

Visualforce UI:

Depending on how you've architected the page, if using a standard controller example.

 

You can write Account.Id to display the current record id.

 

Extension / Controller:

 

Use ApexPages.CurrentPage().getparameters().get('id') to access the record id.

 

 

All Answers

Chris DaviesChris Davies

There are different ways you can access the record id

 

Sttandard UI:

 

The record is normally displayed in the url

 

Example:

 

Url

https://na14.salesforce.com/001d000000Ar3CM

 

Record id:

001d000000Ar3CM

 

Visualforce UI:

Depending on how you've architected the page, if using a standard controller example.

 

You can write Account.Id to display the current record id.

 

Extension / Controller:

 

Use ApexPages.CurrentPage().getparameters().get('id') to access the record id.

 

 

This was selected as the best answer
lavanlavan