I recently had a problem in Unified Service Desk (USD) that meant I needed to refresh the contents of a global tab each time the user returned to the tab.

In my example, I wanted to always show the user the latest activities they needed to complete in a “My Work” tab. As the activities could rapidly change I needed to ensure they were always current without the operator needing to keep clicking refresh every time they viewed the tab.

To achieve this I followed these steps ….

  1. Added a new event to the main layout hosted control.
  2. Added an action to that event to refresh the “My Work” tab.
  3. Added a condition to be selective on when to refresh the tab.

Note, I found a limitation with this approach as it only worked if the tab to be refreshed was always present. When not present I could see errors in the debugger! In my particular example that wasn’t a problem, as I was already loading a list of “My Work” on the DeskTopReady event of the global container. And I’d already prevented the users from closing this tab.

Step One – Add a new event to the main layout hosted control.

The event I needed to attach an action to did not exist out of the box and had be to be added. Navigate to the main layout hosted control within Unified Service Desk. Go to the events option and add a new one. Mine looked like the one shown below.

Click add new event on screen below, and create an event called “SelectedAppChanged”.

Refresh - 1

Then, as shown below save this and add a new action.

Refresh - 2

Step Two – Add an action to that event to refresh the “My Work” tab.

My action looked like this;

Refresh - 3

Notice that the hosted control is “My Work” and the action if “Refresh”. You could (of course) apply this same approach to any global tab.

Step Three – Add a condition to the refresh action.

I only wanted to be sure the refresh logic was only triggered as the user selected the “My Work” tab., And not on every tab change. Therefore in the advanced section of the action I added a condition.

Refresh - 4