Activity Forums Salesforce® Discussions How do you refer to current page id in Salesforce Apex?

  • shariq

    Member
    September 22, 2018 at 11:25 AM

    If you want to retrieve id in a visauflrorc page then you can retriev it using standard cotnroller.

    for ex:

    public myControllerExtension(ApexPages.StandardController stdController) {

    this.acct = (Account)stdController.getRecord();

  • Parul

    Member
    September 22, 2018 at 11:56 AM

    Adding some point:

    you can also use this

    apexpages.currentpage().getparameters().get('id') for visualforce page's id.

     

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

Video in

Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a  

Popular Salesforce Infographics