In this post, we will look at Unified Service Desk Event Parameters that can be used to help with building business logic into your USD apps. Event Parameters are parameters that are populated as a result of a USD event occurring. When used with action calls when events run, they can be used like other parameters in USD. Let’s look at how they work.
In my USD environment I have 2 tabs, Dashboard (Global) and Bing Map:
When a user clicks from one tab to another, we can see from the USD debugger that it is running the ApplicationTabChange event, and we can see the Parameters on the right – currentApplication and previousApplication:
Let’s go to the USD configuration and add some events to show we can use these parameters. For the CRM Global Manager, go to Events:
In my case, the ApplicationTabChange event is not here, so let’s add it (we know it runs, we just need to add it so we can use it if we want):
Add an existing Action Call:
Let’s add a DisplayMessage action with the data to display:
Current application: [[currentApplication]] Previous application: [[previousApplication]]
Add it to the ApplicationTabChange event and start USD.
In clicking from one tab to another, we see the action call is invoked, and the event parameters are being displayed:
So this is useful if we wanted to know where a user is clicking from and to. Let’s try it with another event. We see when we click on a Contact record in USD, it runs the NavigationRequested event, and it has the URL of the record:
Let’s go to the Contact hosted control and see this event:
We will add a new action call to display the [[url]]:
Now, in USD when clicking on a Contact we see the URL is displayed:
This can be useful if we wanted to parse the URL to see which record is being selected, and potentially add more logic such as getting the record with an entity search.
Check out the USD documentation online which shows parameters under the pre-defined events per hosted control: