I love answer questions about Unified Service Desk!
The question I was asked today was how to load an external web page from a toolbar button. That is fairly simple and typically done with a global tab. But the twist here was to start a session containing that page.
Here is the answer;
- Create a hosted control.
- Create an action. (To show webpage)
- Create an action. (To Start a Session)
- Create a toolbar and toolbar button.
- Create a session name.
In my example I created a button called “LOAD PAGE”, this started a session and loaded a webpage into that session. If I am honest, I think I would have done this as a global tab and not made the web page part of a session. But the person asking the question specifically asked about loading a web page into a new session from a toolbar.
Plus, in the end this turned into an interesting example! As I am creating a session WITHOUT using a window navigation rule. Using a CreateSession action. A first for me!
Step One – Create a hosted control.
As with most things USD related I start by creating a hosted control, as I will need a tab to hold a web page. Mine looked like this;
|Name||EXAMPLE WEB PAGE
You could call yours anything!
|Display Name||TAB NAME!
This is the name that will show above the tab.
|USD Component Type||Standard Web Application|
|Hosting Type||IE Process
I always use IE Process and so should you!
|Application is Global||NOT selected.|
Step Two – Create an action. (To show webpage)
The action to show a web page is pretty simple. I just used a navigate action.
|Name||WEB PAGE – Navigate|
You will see why I 20 in a minute!
|Hosted Control||The one we just created, “EXAMPLE WEB PAGE”|
What is interesting here is that I am using a navigate action! Interesting as navigate actions do not trigger the window navigation rules, so I needed a non-standard way to start my session.
This could be any webpage you want to display.
Step Three – Create an action. Create an action. (To Start a Session)
Next I needed an action to start my session as I wasn’t going to use a window navigation rule.
|Name||CRM Global Manager – Create Session|
You will see why 10 in a minute!
|Hosted Control||CRM Global Manager
You will have a global manager, although it could have a slightly different name!
Step Four- Create a toolbar and toolbar button.
Next I added a toolbar button to my main toolbar. And added the two actions I had created. Mine ended up looking like this ….
Hopefully the order now makes sense! As I needed that create session action to have a lower number than the navigate action.
Obviously this is just an example, in a production version you would name the button in a better way!
Step Five – Create a session name.
The final step is to give my session a name. This again was slight non-standard! Typically sessions are started from a CRM entity. Here no entity was involved.
In the session lines section of USD settings I created a session line that looked like this;
|Name||DEFAULT SESSION NAME
Could be called anything really!
This isn’t normal. What is going to happen is whatever session name we pick will be used whenever a session has no entity.
The name I wanted to display in my application.
Hopefully this has been an interesting example and answered the question I was posed. I have found this fun to do as I’d not used a CreateSession action before. Thanks.