Hello,
How to reference "/_script/sfa/quotes/quote.js" in Custom WebResource File?
WHen a Quote gets created and we try to click the Create Order Button .
It hits the reference "/_script/sfa/quotes/quote.js" "AcceptQuoteOrCreateOrder" function.
Now I have a need for some Custom validations to put before hitting this Function.
I tried adding a new Command action under ribbon workbench below or above the specified command action. But it gives runtime issue as /_script/sfa/quotes/quote.js is not a valid web resource assembly. Wherein if I remove my changes and just keep the quote js reference it works.
I need to amend a custom function before this hit. Or any way I can Reference this quote,js function in my custom Web Resource and I'll get it removed from button hit instead and add on my customised function????
Thanks In Advance
Hi Manish Uppal,
There is no need to add reference. After the validation, invoke the OOB function is ok.
I'm using Dynamics 365 Online. My library name is: $webresource:Sales/_static/SFA/quotes/QuoteRibbonActions.js Function name is Sales.QuoteRibbonActions.Instance.acceptQuoteOrCreateOrder.(If you are also using Dynamics 365 Online, please check the button's command.)
Then I create a new web resource like this:
function createOrder(){
console.log("create order");
//do validation:
Sales.QuoteRibbonActions.Instance.acceptQuoteOrCreateOrder();
}
Use it in the Ribbon Workbench:
Result:
Reference:
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156