function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nick Sauer 9Nick Sauer 9 

CPQ - Read Quote API - Get Uncommitted Changes from UI

Scenario is when we are in the QLE and change field A....
Then we use read Quote API -> as expected, this does not consider changes that are not yet saved, and the QuoteModel is just comprised of the current database version of the record.
SBQQ.QuoteLineEditorController has some global methods, including Save, but nothing that gives access to pending changes (that I can see).  
There are some other candidate classes in the managed package but without global methods.  
 
Is there some trick to programmatically collect and save the record while in the QLE itself?  Or is there some other way to trigger Quick Save (for example), without user interaction, prior to launch of a custom action?  I am probably missing something obvious here, and hoping someone has done this before!
SwethaSwetha (Salesforce Developers) 
HI Nick,
You can reach out to Salesforce Revenue Cloud page on https://trailhead.salesforce.com/trailblazer-community/groups/0F93A0000009TGxSAM?tab=discussion&sort=LAST_MODIFIED_DATE_DESC for better visibility and inputs on your ask.
 
If this information helps, please mark the answer as best. Thank you
Nick Sauer 9Nick Sauer 9
Thanks Swetha - that is where I posted originally,and moderators suggested to post on dev forum.  Let's see if I get information from either location!
SwethaSwetha (Salesforce Developers) 
Sure, Nick. Can you share more details on your use case? Are you trying to quick save after every field update? 
Nick Sauer 9Nick Sauer 9
I’m opening a custom approval preview on QLE, and want to quick save on the front end of that prior to pulling the derived approvals. Thanks. Get Outlook for iOS
SwethaSwetha (Salesforce Developers) 
HI Nick,
I checked with my team and have these inputs.

The only way you can access the current quote model data is in a QCP(https://developer.salesforce.com/docs/atlas.en-us.cpq_dev_plugins.meta/cpq_dev_plugins/cpq_dev_jsqcp_parent.htm).

You could take the quote model and send it to an apex rest API and do what you want from there, but I question the validity of the use case of doing a save every time you click calculate. If you want that just put quick save as the only available custom action.

See: https://developer.salesforce.com/docs/atlas.en-us.cpq_dev_api.meta/cpq_dev_api/cpq_quote_api_save_final.htm

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Nick Sauer 9Nick Sauer 9
Thanks for the input. We are not trying to Save every time there is a Calculate, and agree that wouldn't be a sensible approach. Rather, this is a preview of the required Approvals from the QLE itself, and those Approvals will not be correctly derived unless the Quote has first been saved. Accessing the QCP as part of that flow then wouldn't really make sense either.