Activity Forums Salesforce® Discussions Why is ApexPages.currentPage().getParameters().get retruning a null value in Salesforce?

  • Why is ApexPages.currentPage().getParameters().get retruning a null value in Salesforce?

    Posted by krati on January 24, 2020 at 12:10 pm

    I am trying to get the value of ApexPages.currentPage().getParameters().get('RecordId'). But it is returning me a null value. What am I missing?

    Deepak replied 4 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Deepak

    Member
    January 24, 2020 at 1:19 pm

    Hi Krati,

    You are trying to get the value of ApexPages.currentPage().getParameters().get(‘RecordId’). But it is returning a null value because there might not be any existing record of that particular record id or may be missing some URL parameters.

    Hope it helps!

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos