Happy Business Starts Here

CPQ X sample code

Guru

CPQ X sample code

I started looking at the sample code for CPQ X and noticed that on https://knowledgecenter.zuora.com/CA_Commerce/I_Development_Resources/C_Component_Library/C_Global_C...

 

that some of the methods show (zqu.QTier charge) in the signature and then in the code they are using methods for the QCharge instead of the tier.

public void test(zqu.QTier charge) {
    if (charge.isTieredCharge()) {
Maggie Longshore
4 REPLIES
Support SME

Re: CPQ X sample code

Hi @Maggie when you say

 

>>and then in the code they are using methods for the QCharge instead of the tier

 

Are you referring to the following test method?

 

public void test(zqu.QTier charge) {

 

Thanks

Doyeli



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

Guru

Re: CPQ X sample code

Yes, there are 2 of these methods on the page. If a tier is passed in the variable name should not be 'charge' as it is misleading.

 

The one labeled 'Update a Field that Results in a Recalculation' will compile because the references are all run-time. But it doesn't work.

 

The one labeled "Update a Field on the First Tier under the QCharge" gives many compiler errors including

 

Variable does not exist: tiers
Method does not exist or incorrect signature: void isTieredCharge() from the type zqu.QTier
Method does not exist or incorrect signature: void isUpdated() from the type zqu.QTier
Variable does not exist: Equalsfalse

 

Maggie Longshore
Support SME

Re: CPQ X sample code

Thank you @MaggieL . Let me try to test on my end and I will reach out to the respective teams to get the  knowledge center updated with working sample code . Sorry for any inconvenience

 

Doyeli



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

Support SME

Re: CPQ X sample code

Sorry for the delay @MaggieL . I will update by this week

 

Thank you

Doyeli



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