web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to reference "/_script/sfa/quotes/quote.js" in Custom WebResource File?

(0) ShareShare
ReportReport
Posted on by 5

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

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    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.)

    pastedimage1641451688042v2.png

    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:

    pastedimage1641451671575v1.png

    Result:

    pastedimage1641451803669v3.png

     

    Reference:

    How to override out of the box button’s behavior in ms crm – Dynamics 365 CE/Power Platform, PowerApps, Power Automate, Azure by Vishal Grade

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans