Yes, that’s a pretty standard requirement in many of the USD projects and majority of the times the Admins/dev teams simply tries to configure it with an action call which will be invoked on “SessionNew” event of global manager. I don’t say it is entirely wrong approach, but majority of the times it yeilds in to inconsistent results – the reason being the time it takes to complete the page load and so the replacement parameter.
There are couple of better solutions (AFAIK) for this to make it more consistent.
a) Use “ExecuteOnDataAvailable” and fire the required action call as sub action to this.
b) Use “BrowserDocumentComplete”, which occurs after the data has been loaded to the Replacement parameters.
In this post, I will go with the Option #b. Option #a, I will take up in next post.
Scenario: Whenever a case has been loaded, If the case Origin is Web then Open the Bing search and pass Case Title to search.
Following are the steps involved (if you are already using OOB configurations, you can skip the first 2 steps as the hosted controls are already present in OOB configs).
3) Create a new action call to Navigate to Bing with query string paramter as the Case title as mentioned below.
Name: Search Bing with Case Title
Order: 10 (any number you want, not really maters at least in this scenario)
Hosted Control: Bing
Shortcut Key: Ctrl+B (Not really mandatory, but having this helps user to quickly come to bing search again if by any chance he closed the tab accidentally).
4) Open the “Incident” hosted control, Navigate to “Events” associated grid, Open the “BrowserDocumentComplete” event and add the above mentioned action call as shown below.
That’s it. Now, Whenever you open the case tab (either by session or by its own) it will first loads the full case form and then you can see it automatically loading the Bing search as well after few seconds (basically after loading the replacement parameters) as shown below.
Note that this is an example approach and you can use the same kind of approach for any other applications wherever you need to use the replacement parameters.
Hope this helps !! Please share your feedback via comments.