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 :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Java script code to enable button (Ribbon work bench) in booking entity if booking is more than 3

(0) ShareShare
ReportReport
Posted on by 80

If have added button abc in appointment booking. This button is only visible when number of booking is greater than 3

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

    Hi,

    Do you mean that the added button should be visible when the selected number of booking is greater than 3 in the view, Otherwise the button should be hidden?

  • Parul Sharma Profile Picture
    80 on at

    No, button is only visible when there are more than 3 booking is present in the view

  • Suggested answer
    SarahMoustafa Profile Picture
    25 on at

    Hi,

    There's an OOB enableRule called SelectionCountRule that could fulfill that need without coding only if it's okay for the user to manually select the records. In other words, the ribbon will be visible if at least 3 records are selected.

    If you want the ribbon to auto count that without user interaction, you can use retrieveMultiple in the enable JS function to get execute the view query and then check on the returned length and based on it, show or hide the ribbon. Not the best in terms of performance so try as much as you can to optimize the query to get only what's needed.

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
FSRon Profile Picture

FSRon 75

#2
James White Profile Picture

James White 21

#3
AT-28040446-0 Profile Picture

AT-28040446-0 20

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans