In my Unified Service Desk (USD) application for Microsoft Dynamics CRM 2016 I present the agents with a tab called “My Work”. In this they can see lists of cases, phone calls, queue items or tasks that are assigned to them.
In a busy call centre agents can expect that new items arrive quite often, I didn’t want my operators to need to repeatedly click refresh to see the most recent cases etc. But as users would have the My Work tab constantly open how could I refresh it automatically. I describe the answer to this problem in this post.
Firstly I wanted to avoid refreshing the tab more that necessary but each time the user looks at the my work tab I wanted it to contain current information. To do this I needed to take two steps;
- Create an event on my main layout hosted control.
- Create an action an associate it with the new event.
Step One – Create an event
The event I needed didn’t exist on my main layout. “Main Layout” is the name I’d given to my panel layout hosted control or my main work area.
If you look at events on this hosted control you may find that one called “SelectedAppChanged” doesn’t exist. If you can’t see it simply add the new event.
Step Two – Create an Action
Below you can see that I have added an action to my the evet I just described.
When the SelectedAppChanged event runs I have two data parameters I can use. [[Selected]] and [[Panel]]. In this example it is the [[Selection]] that is significant. Below you can see that my refresh action itself is pretty straight forward. My hosfed control is “My Work” and the action is “Refresh”.
I also added a condition to this action call …..
The condition was “[[Selection]]”==”My Work”, as I only want the refresh to be triggered as the user selects the My Work tab. Without this the tab would be refreshed every tie the user clicks on any tab. (I guess that would work but would be very wasteful to keep refreshing a tab the user isn’t looking at!)
Hopefully this is a simple idea that you can adapt to selectively refresh or fire other actions as tabs are selected.
J
Leave a comment