Happy Business Starts Here

Highlighted
Zuora Support

Cannot edit products on existing quotes due to "Attempt to de-reference a null object" error

After upgrading to Zuora Quotes v6.5 (or later), when adding products to a quote, the following error occurs.

 

"Attempt to de-reference a null object"



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 ACCEPTED SOLUTION

Accepted Solutions
Zuora Support

Re: Cannot edit products on existing quotes due to "Attempt to de-reference a null object"

Starting on Zuora Quotes v6.5, Quote Charge object is replaced with Quote Rate Plan Charge for Quote Object Model Refactored purpose.  For existing quotes created prior to the upgrade, if Quote Charges were used, you would no longer be able to access them.

 

As a part of the post upgrade, you can migrate Quote Charge objects to Quote Rate Plan Charge objects using these steps.

 

  1. Disable any custom triggers or validations on Zuora Quotes objects in your org.
  2. Open Developer Console.
  3. Navigate to Debug > Open Execute Anonymous Window.
  4. Enter the following Apex code in the Enter Apex Code window:
       
    zqu.ZuoraQuotesUpgradeConversion6_51 zuc =
    new zqu.ZuoraQuotesUpgradeConversion6_51();
    ID batchprocessid = Database.executeBatch(zuc);
  5. Click Execute.
  6. Navigate to Setup > Administration Setup > Monitoring > Apex Jobs and verify that the above job is running.
  7. Disabled customer triggers or validations can be re-enabled after the job finishes successfully.

 

After that you should be able to edit existing quotes again.

 

References:

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

2 REPLIES 2
Zuora Support

Re: Cannot edit products on existing quotes due to "Attempt to de-reference a null object"

Starting on Zuora Quotes v6.5, Quote Charge object is replaced with Quote Rate Plan Charge for Quote Object Model Refactored purpose.  For existing quotes created prior to the upgrade, if Quote Charges were used, you would no longer be able to access them.

 

As a part of the post upgrade, you can migrate Quote Charge objects to Quote Rate Plan Charge objects using these steps.

 

  1. Disable any custom triggers or validations on Zuora Quotes objects in your org.
  2. Open Developer Console.
  3. Navigate to Debug > Open Execute Anonymous Window.
  4. Enter the following Apex code in the Enter Apex Code window:
       
    zqu.ZuoraQuotesUpgradeConversion6_51 zuc =
    new zqu.ZuoraQuotesUpgradeConversion6_51();
    ID batchprocessid = Database.executeBatch(zuc);
  5. Click Execute.
  6. Navigate to Setup > Administration Setup > Monitoring > Apex Jobs and verify that the above job is running.
  7. Disabled customer triggers or validations can be re-enabled after the job finishes successfully.

 

After that you should be able to edit existing quotes again.

 

References:

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

Highlighted
Guru

Re: Cannot edit products on existing quotes due to "Attempt to de-reference a null object"

I suggest you query the QuoteCharge table once the migration is complete to see if it was successful - check the is migrated field.

 

SELECT Id, zqu__Quote__c
FROM zqu__QuoteCharge__c
WHERE zqu__IsMigrated__c = false

 

It the query returns no records then you are good.  If not you may need to run the batch with smaller sizes to isolate the error.

You can do this by placing a number as the second parameter like so: 

 

Database.executeBatch(zuc, 50);

 

This would run the batch with 50 instead of the default of 200. When you run the batch again it will take less time because all of the quotes that succeeded the first time through will be skipped. I ended up having to manually fix a few quotes that had errors to get them all migrated in sandbox.  I had no errors in production.

 

Maggie Longshore