public with sharing class FeeEstimatePdfController {

private final Fee_Estimate__c feeEstimateRecord {get;set;}

public FeeEstimatePdfController() {
    Id currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
    //Record Id showing on lightning Record page url -> a1r0w000001vWScAAM
    //currentRecordId -> Ida1r0w000001vWSc
    feeEstimateRecord = [SELECT Id, Name FROM Fee_Estimate__c 
                        WHERE Id =: currentRecordId];
    //This above return nothing and show me error when I try to render the vf page as 


 public Fee_Estimate__c getFeeEstimate() {
    System.debug('Fee Estimate' + feeEstimateRecord);
    return feeEstimateRecord;

1 Answer 1


Id that you are seeing in URL is 18 character Id which is case insensitive, while other id is 15 character is case sensitive.

You can have detailed information about 15 character Id and 18 character Id on the below link https://help.salesforce.com/s/articleView?id=000324087&type=1

The difference that I see is that there is this Id character that is appended in the actual record Id Ida1r0w000001vWSc, if you are appending this Id yourself just remove it and your String, and the actual Id shall work to fetch the record.

You must log in to answer this question.

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