Featured

    Featured Posts

  • How to use Shortcut keys in USD
  • Create Timer behavior with action calls

Load Tabs based on Replacement Parameters

Recently was trying to answer a community query where the user needs to open a standard LOB Application by passing some parameters from the Contact tab.

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).

1) Create a hosted control for Case as shown below.
image

2) Create hosted control for Bing application as shown below.
image

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
Action: Navigate
Data: url=http://www.bing.com/search?q=[[incident.title]]
Condition: "[[incident.caseorigincode.name]+]"=="Web"
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).


This is how the action call should look like .
image

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.
image
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.
image

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.
author

Naga Srikanth Alluri

A passionate developer, learner and a budding blogger :)

Get Email Updates to your Inbox!

Post a Comment

Hey, dont forget to leave your name if your giving comment as anonymous user :)

www.CodeNirvana.in

Translate

Total Pageviews

Copyright © CRM Ramblings | Designed By Code Nirvana