In Salesforce CPQ, in quote, when we have a formula like below:

IF(Contains(SBQQ__Opportunity2__r.RecordType.Name, "Agent"), "Agent", "")

The QuoteLine Editor will throw attempt to de-reference a null object error when we try to save the QuoteLine.

The formula actually works by itself but it actually breaks the QuoteLine Editor.

Since QuoteLine Editor page is a VF page in the CPQ managed package, I can't find anything useful in the debug log. When I change the formula back to use hard-coded RecordTypeId the issue just gone.

Can I know why this could be an issue for CPQ QuoteLine Editor?

Edit Following the comment, I paste the result of my browser's error info here: enter image description here

It does provide some information here. But based on this, I still haven't got a clue about what exactly is happening. Any ideas about that?

  • Salesforce CPQ errors often shed more light through browsers developer console. Did you try checking that? – Shailesh Patil Aug 29 '18 at 4:50
  • @ShaileshPatil Thank you for your information. I have just done that. It does provide a bit information there but I still haven't got any clue about what was happening. I paste the screenshot of that edited in my answer. – Lance Shi Aug 29 '18 at 5:23
  • It seems internally the CPQ is calling your formula field for something. May be you try using RecordType.DeveloperName instead of RecordType.Name. Not sure if this solve your problem. – Shailesh Patil Aug 29 '18 at 7:36
  • Did you add that field to the referenced fields fieldset on the Quote? – brezotom Nov 14 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.