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 :
Microsoft Dynamics CRM (Archived)

Ribbon Workbench Command Button with 2 out of the box actions

(0) ShareShare
ReportReport
Posted on by 70

On the quote entity, there is a close quote button, which I would like to add the activateQuote action to, so reducing the number of clicks and make things a little easier for the users.  This part is fine and I can do.  My issue is that the activateQuote action needs to complete before the closeQuote action fires.  I tried changing the order of the actions, but I get the same result of the close dialog appearing and before the user can enter anything, the record becomes active.

Is there away to control this?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Pramod M Profile Picture
    1,445 on at

    Hi Matt,

    I am not sure about controlling the OOB action sequence. But what you can do is that create another button and show hide close quote button based on the active status.

    This is the better approach as you are not supposed to tamper the OOB events, if a new update comes then your code can break.

    Hope this helps.

    Regards,

    Pramod

  • Matt Paine Profile Picture
    70 on at

    Thanks.  Although this would not fit the process that the company has, so I'm attempting to call the activateQuote and closeQuote from a custom script so not having to tamper with OOB functions.  

    The problem I have now is the only reference to these function is /_static/SFA/quotes/quote.js.  This reference fails in the code when I try and call the functions.

    I need to know the full reference of the quote.js, any ideas?

    Regards

    Matt

  • Verified answer
    Pramod M Profile Picture
    1,445 on at

    Hi Matt,

    There are some changes in the JavaScript reference

    ribbonworkbench.uservoice.com/.../785901-check-if-you-need-to-update-your-ribbon-customisat

    Also you can consider moving the function to a workflow or using actions , which are all supported ways. If you know what the oob javascript function is doing you can achieve that with workflow or action.

    crmtipoftheday.com/.../create-a-two-action-ribbon-button

    msdn.microsoft.com/.../dn481600.aspx

    debajmecrm.com/.../invoke-your-custom-action-from-dynamics-crm-web-apidynamics-crm-2016

  • Matt Paine Profile Picture
    70 on at

    Thanks again, I have managed to access the quote.js and copied the functions required into my custom script and with the use of callbacks, I have ordered the functions execution.  My only problem, now is the odata call retrieves the requires data but appears to loop through the request for a second time.  This in turns causes an error at the end of the code.

    Why would the request run a second time?

    Regards,

    Matt

     

  • Pramod M Profile Picture
    1,445 on at

    Sorry for late reply, do you mean to say that the odata call is happening twice or the function is called twice?

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans