In Unified Service Desk (USD) you can use the RunXrmCommand to interact with your CRM forms.
The example I’ve given below is an action call which will expand a tab on my forms called “stats”.
Xrm.Page.ui.tabs.get("stats").setFocus(); Xrm.Page.ui.tabs.get("stats").setDisplayState("expanded");
I have played around with other javascript, some things I expect to work don’t!
A couple of useful examples that do work include (I will add more as I confirm what works);
Display a notification in the notification bar.
Xrm.Page.ui.setFormNotification("Stats Opened", "INFO", "1");
Give an alert.
alert("Hello Stats");
Leave a comment