Categories
Problem & Solution

“Attempt to de-reference a null object ” while generating a Quote document

Error

In Salesforce CPQ, you might sometimes see an error message

Attempt to de-reference a null object

like shown in the image below:

while generating a Quote document from your Quote Template.

Solution

In short: Make sure you have all pricing set up correctly for your products.

While fixing this issue, you should identify first the very specific product causing that error. Once you have it – fix the pricing definition.


And here is my story: I’ve found this page on Salesforce documentation resources: error message in QLE, and it indeed confirmed that I had Quote Lines with required empty fields:

That Quote Line with no list price and no special price was a Percent of Total product. That PoT product was a configured correctly, however, I have found another product that was contributing the price to this PoT line item. That product had the pricing configuration all messed up. It had PoT % set, it was “One Time” and had subscription term set to 0…

I removed the PoT %, I changed the data loaded value of “One Time” to “One-Time” and removed the 0 from the subscription term, and it all started to work well!

By Marcin Krzych

Author of "The CPQ Implementation Guide" book. In IT since 2007, In Salesforce ecosystem since 2011, In Salesforce CPQ projects since 2016.
8 SF certifications.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.