on ‎2021 Oct 01 3:51 PM
Hello,
Anyone knows how to change item custom field with global script on CPQ?
Best regards.
Request clarification before answering.
Hello,
Quote item are a bit different. There's no getCustomField on them... you just need to put the custom field name in ["xxxx"].
When you got your variable that is the quote item you have do do this:
yourQuoteItemVariable["yourFieldName"].Value = yourData
There's many way to get the quote item so if you also need help on this just ask.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello maxgag2,
Is there any chance that there is a similar way of changing attibute values. I am trying to change attribute values of an item from erp using global script as a web service. I am passing attr name and attr value to script but I cound't figure it out how to access attribute after loading Quote.
Best regards.
Hello sbslmhmt,
Can you pleas open another question regarding this? So other will be able to see it too?
Thanks
Hello maxgag2 ,
How to update product attribute value from a web service on Sap CPQ?
Thank you very much. Best regards.
Hello Pritam,
I've used below code to update item custom field.
Best regards
Quote.GetItemByQuoteItem('1')['yourcustomfieldname'].Value = yourData
Thanks for the revert.
I am trying to loop over all the quotes based on some condition for example created within 2 days and then one by one make an API call for each one of them to get order status and update data from API response to custom field.
In this case when I use above code it throws an error "'NoneType' object has no attribute 'GetItemByQuoteItem'
its not able to refer to particular Quote because I am not calling it from inside the quote.
Hope I am able to explain. You know how can I make this work
Thanks & Regards,
Pritam
Hello,
For text field:
Quote.GetCustomField("yourFieldName").Content = yourData
For attribute type field:
Quote.CustomFields.SelectValueByValueCode(yourFieldName, 'yourSelection')
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Quote item are a bit different. There's no getCustomField on them... you just need to put the custom field name in ["xxxx"].
When you got your variable that is the quote item you have do do this:
yourQuoteItemVariable["yourFieldName"].Value = yourData
There's many way to get the quote item so if you also need help on this just ask.
Thanks
| User | Count |
|---|---|
| 32 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.