Happy Business Starts Here

Zuora Alumni

Custom action plugin changes do not reflect in quotes

Issue: Customer wrote a Custom Action Plugin. The custom action plugin is executing correctly but changes are not reflecting in quote.

 

Symptoms: Null pointer exceptions are thrown when adding a chargegroup data object in a custom action, because the charge group data object by default has no reference to the Product Rate Plan.



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
Highlighted
Zuora Alumni

Re: Custom action plugin changes do not reflect in quotes

Workaround: This can be worked around by using the following code, a permanent fix is tracked on COM-11944 and release notes will be updated once deployed.

 

ID productRatePlanId = ...
      // Add Product (Adds immediately, allows access to Charge details)
      zqu.DataObject addedPlan = new zqu.ZChargeGroupDataObject(masterObject, productRatePlanId);


      // Set ProductRatePlan reference.
      zqu__ProductRatePlan__c prp = new zqu__ProductRatePlan__c(Id=productRatePlanId);
      zqu.DataObject dataProductRatePlan = new zqu.CommittedDataObject(prp);
      addedPlan.putParent('zqu__ProductRatePlan__c', dataProductRatePlan);


      addedPlan.flagAdded();
      masterObject.addChild('zqu__QuoteRatePlan__c', addedPlan);

 



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

Tags (1)
1 REPLY 1
Highlighted
Zuora Alumni

Re: Custom action plugin changes do not reflect in quotes

Workaround: This can be worked around by using the following code, a permanent fix is tracked on COM-11944 and release notes will be updated once deployed.

 

ID productRatePlanId = ...
      // Add Product (Adds immediately, allows access to Charge details)
      zqu.DataObject addedPlan = new zqu.ZChargeGroupDataObject(masterObject, productRatePlanId);


      // Set ProductRatePlan reference.
      zqu__ProductRatePlan__c prp = new zqu__ProductRatePlan__c(Id=productRatePlanId);
      zqu.DataObject dataProductRatePlan = new zqu.CommittedDataObject(prp);
      addedPlan.putParent('zqu__ProductRatePlan__c', dataProductRatePlan);


      addedPlan.flagAdded();
      masterObject.addChild('zqu__QuoteRatePlan__c', addedPlan);

 



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

Tags (1)