We got a requirement to Enable\disable ribbon button based on selected view.

View name
View name

We used JScript to disable the button by getting the selected view name.

Below is the script to get the selected view name of  Main Grid

var viewName = “”;

if (crmGrid && crmGrid.control) {

viewName = crmGrid.control.get_viewTitle();

}

🙂

Leave a Reply

Discover more from Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI

Subscribe now to keep reading and get access to the full archive.

Continue reading