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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Ribbon Workbench 2016, How to make CustomRule Enable Rule with asynchronous call?

(0) ShareShare
ReportReport
Posted on by 422

In Ribbon Workbench, I have a custom rule in my enable rules, and the javascript is supposed to return either true or false. The problem is, it doesn't seem to work when the return is done in an asynchronous call. I need to verify a value through the web api, but it only works if I make the call synchronous(bad practice). Is there a way to achieve this with asynchronous call?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    You can try doing a ribbon refresh once asynchronous call is done. It will work.

    Xrm.Page.ui.refreshRibbon();


  • Community Member Profile Picture
    on at

    I am looking for the same thing. did you find the solution for this?

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    I would like to share an old thread , Please have a look might be useful for you-

    community.dynamics.com/.../287978

  • anonsgate Profile Picture
    422 on at

    I calculated it before I called the javascript on the page load and stored the value in a global variable that I retrieve in a javascript rule of ribbon workbench

  • Community Member Profile Picture
    on at

    Hi anonsgate,

    I'm having the same problem.

    Can you please share how did you calculate the value before the onload event?

    Thanks in advance!

  • gdas Profile Picture
    50,091 Moderator on at

    Please have a look below reference  -

    butenko.pro/.../showing-ribbon-button-based-on-the-result-of-async-operation

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans