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 365 | Integration, Dataverse...
Suggested Answer

Add Execution context to Ribbon Workbench

(2) ShareShare
ReportReport
Posted on by 515

I'm using a Smart Button in Ribbon Workbench to trigger a workflow.

In calledback Javascript I need code to refresh the page after this.

How do I pass Execution Context here?

Nothing I'm trying is working, and I'm just getting error messages.

Thanks
Lee

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    In the command button you should be able to pass Primary Control which acts as execution context for the command buttons.

    this should help you: docs.microsoft.com/.../pass-dynamics-365-data-page-parameter-ribbon-actions

    blog.magnetismsolutions.com/.../getting-dynamics-365-formcontext-from-ribbon-workbench

  • Lee-Martin Profile Picture
    515 on at

    So this would work?

    primaryControl.data.refresh(save).then(successCallback, errorCallback);

    I'm getting an error saying primaryControl is not defined - which is the same as the other errors I've been getting....

  • Mahendar Pal Profile Picture
    45,095 on at

    can you please share some screenshot how you configured it and your code for checking ?

  • Lee-Martin Profile Picture
    515 on at

    The code is as above5861.ribbon.PNG

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Assuming you have the latest version of the Smart Button solution installed (https://github.com/scottdurow/RibbonWorkbench/releases), you just need to use:

    context.data.

  • Lee-Martin Profile Picture
    515 on at

    context.data didn't work...context-error.PNG

  • Lee-Martin Profile Picture
    515 on at

    The issue might be around the fact that I'm using a smart button (the principle purpose of the button is to trigger a workflow)

  • Lee-Martin Profile Picture
    515 on at

    Is there a way to put a JavaScript refresh in place using JavaScript for a Smart Button?

  • Community Member Profile Picture
    on at

    yes the workflow

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 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Pallavi Phade Profile Picture

Pallavi Phade 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans