Closed nabondance closed 4 months ago
I checked a bit more Breaking since 2.2.2, probably this PR: https://github.com/texei/texei-sfdx-plugin/pull/146
Hi @w-andre , I saw you're the one who made the PR #146 Did you had this issue or a similar one since 2.2.2 ?
After a deeper investigation, there is more details on the issue:
As of today, the issue only concern two settings in the Groups
tab:
Name Field
Description Field
Root cause of the issue:
Theses fields are picklist fields with values depending on another setting (Object
), the picklist values options are calculated by Salesforce.
In the code, to select a picklist value we wait for the picklist to exist (with waitForSelector) which is great but it doesn't wait the picklist to have actual values and not only --None--
.
So when we want to select the specified value, the script fails because the value doesn't exist on the picklist.
Possible solutions:
await page.waitForTimeout(1000);
only for the 2 concerned settingswaitFor Selector
to wait until there is values different then --None--
waitFor Selector
to wait until there is the value to selectPersonal feedback: Adding the waitForTimeout is ugly but it works. I couldn't make the other options working, maybe a real js/ts dev can do it better then I.
What's your thoughts on that @FabienTaillon ?
update, the issue also exist for Subscriptions and Renewals
tab:
Subscription Prorate Precision
because it depends on Subscription Term Unit
Hi @nabondance,
I've looked into this issue and can reproduce it on my side.
The select
input is stored in a variable and all further processing relies on this variable. The problem is that the asynchronously loaded options are not populated in this object and therefore we run into a timeout because the values will never be available for us.
I've made a code change that should fix the issue and will create a PR containing it.
Maybe you could check if it works for you too.
Hi @w-andre,
Thank you for understanding the issue better than I. The explanation is very clear, I understand it now.
I checked the PR and it fix the issue on our side too.
@nabondance Great to hear the fix works for you too!
This isn't really the right place for this, but anyways: Do you have any experience in source tracking Salesforce Billing settings? At the moment we are only tracking our CPQ settings in a git repo with the ability to deploy them. Our Billing settings are only screenshots for now. I would be thankful if you have anything to share in this regard. 😄
Hi @w-andre ,
Billing package config is in fact easier to manage than cpq package config because it uses object we have read/write rights on: blng__BillingConfig__c
Basically it is simply managing config data and you can do it with any classic way to manage data:
If you wants to go even deeper on managing data, in my Github profile there's slides/video of a presentation I made about it
Hi @nabondance,
I didn't know about the custom setting blng__BillingConfig__c
.
That was the missing piece for me!
Thanks! 😄
command:
sf texei cpqsettings set
When specifying a key-value that is a picklist depending on another value in the Group tab, the script timeout.Steps to reproduce:
Have cpq installed
Have cpq package configured with everything on "Groups" set as false
Have the configuration input file:
Do the command
sf texei cpqsettings set --inputfile=<your input file path>
Have the error:
It is working in 2.2.1 It is failing in 2.4.1 and 2.5.0
My finding so far:
--None--
, the script works and can save the specified config)