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 - multiple subsequent actions per command?

(1) ShareShare
ReportReport
Posted on by 3,079

I have a button I've added in Ribbon Workbench where I'd like the command to have two actions, but specifically for the second one to not fire until the first one is done.  (The first one runs a workflow, and the second opens a page.)  Right now they're both firing, but the second one goes right away, and the workflow portion is still sitting at the confirmation screen.  I need the workflow to finish before the page opens.  Is that possible?

*This post is locked for comments

I have the same question (0)
  • awalters Profile Picture
    3,079 on at

    I'd still like to just have multiple actions in one command running in sequence, for ease of maintenance, but I decided to try to test just writing my own custom js function that calls each of the individual commands, just in case that's the only workaround.

    (Note: running my own js wasn't working, but is now...so editing this comment since it won't let me delete.  I'll come back and report once I figure out if this wrapper idea will work, but I'd love to hear alternatives...)

  • Verified answer
    ScottDurow Profile Picture
    21 on at

    You solution of using a javascript action to run the multiple tasks is the only option really - since each action must complete synchronously before the next action is started.

    If you are using the standard start workflow logic then you can't get around the confirmation screen - so you need to start the workflow using your own Javascript logic.

  • ChrisC Profile Picture
    630 on at

    Yes, like Scott says, you'll need to use a sync workflow - ribbon button calls your JS function that executes the workflow (using SOAP for now, until supported by the WebApi community.dynamics.com/.../143712) then afterwards opens your page.

  • awalters Profile Picture
    3,079 on at

    Sorry, I'm confused - not sure why I'd use SOAP?  Running the workflow fine using this - ribbonworkbench.uservoice.com/.../132235-create-a-workflow-short-cut-ribbon-button-no-code - not just need to add in the page open afterwards.  I think I should be able to just wrap the same workflow JS that solution uses in my little custom wrapper, shouldn't I?

  • awalters Profile Picture
    3,079 on at

    Scott - thanks!  We're fine having the confirmation, so I think I could probably just stick with the javascript functions you have in your no-code walkthrough on your site; I'd just need to wrap them inside another function so I can do the page open call next, right?

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    That javascript will still open the 'are you sure' dialog - so you'd need to use code like - processjs.codeplex.com

  • awalters Profile Picture
    3,079 on at

    Hmmm - I'd played with that solution but couldn't get it to work.  I'm not sure I need to cut out the "are you sure", though...still waffling on that one.

  • Verified answer
    ChrisC Profile Picture
    630 on at

    Hi Allison, the point is that you need to finish the synchronous workflow BEFORE you refresh the page - the standard ribbon JS functions don't support a callback.

  • awalters Profile Picture
    3,079 on at

    Gotcha.  Okay, I finally got process.js working, so I have a proof of concept on this portion, anyway.  Now I just need to figure out how to write the custom workflow action I need, and I should have all the pieces.  :-)  Thanks!

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