- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √