Loading

Salesforce CPQ error 'Attempt to de-reference null object'

Publiceringsdatum: Nov 4, 2025
Beskrivning
In Salesforce CPQ, the error 'Attempt to de-reference null object' is caused by a line of code that is searching for a value that does not exist. A common cause is if that particular field value is null when a value is expected. This error can also occur when a required Lookup field is missing a value.
Lösning

Determine where the 'Attempt to de-reference null object' error is appearing, then follow the steps below to resolve the error.
 

On a New Quote

  • Ensure correct the Quote's Pricebook look-up is populated after selection and its Pricebook ID is a valid record ID
  • ​If installed package setting 'Solution Groups Enabled' is enabled, ensure the Object and Name features in package settings are populated properly.


When adding a Product Bundle

  • If you have a Product-scoped Lookup Rule that is referencing a Lookup Field that does not exist on the Lookup Object


During Quote Configuration


When a Quote is Ordered

  • Confirm the quote field SBQQ__Type__c is not null
  • Confirm all Quote Lines have a Quantity populated
  •  If a Quote has Quote Lines with MDQ Products, confirm the fields SBQQ__SegmentIndex__c, SBQQ__SegmentKey__c, SBQQ__SegmentLabel__c, SBQQ__StartDate__c, SBQQ__EndDate__c are populated. You can use below query to verify the fields:
     
    SELECT id, SBQQ__Quantity__c, SBQQ__EffectiveQuantity__c, SBQQ__SegmentIndex__c, SBQQ__SegmentKey__c, SBQQ__SegmentLabel__c, SBQQ__StartDate__c, SBQQ__EndDate__c FROM SBQQ__QuoteLine__c WHERE SBQQ__Quote__C = '<<Your Quote Id>>>'

    Note: The Quote Id should be inside single quotation marks


Save, Quick Save, Calculate on Quote Line Editor

  • List Price or Special Price is populated on all Quote Lines
  • Quantity is not null
  • A formula (either field or defined in a Price Rule) is referencing a field on an object that is not directly related to the Quote, Quote Line, or Quote Line Group.
  • A Quote Line is referencing a RequiredBy Id that does not exist.



During Contract Renewal or Amendment

 

When Contracting From Order or Opportunity and setting Contracted to True:

  • Confirm if there is an existing Contract tied to the Quote. If so, the quote needs to be deleted or set as null in the SBQQ__Quote__c lookup on the Contract.
Knowledge-artikelnummer

000381779

 
Laddar
Salesforce Help | Article