In my Unified Service Desk (USD) interface I have toolbar button on the navigation toolbar of account that will show the website of an account. Problem was not all the account have a website defined.

So I enhanced the button to either show the accounts website or if not known to conduct a google search on the accounts name.

In my action to navigate to the website of the account I changed the url to be “url=[[$Scriptlet.AccountWebSite]]”, I then created a scriptlet called “AccountWebSite”.

My scriptlet looked like this, pretty simple really. It simply constructs a url to search google for the account name or returns the actual url of the accounts website.

I hope you find this simple change useful.

 

function AccountWebSite () {
var accountWebSite = "[[account.websiteurl]+u]";
var url;
if(accountWebSite == "" || accountWebSite == null) {
url= "https://www.google.co.uk/?gws_rd=ssl#q=" + "[[account.name]+]";
} else {
url = accountWebSite;
}
return url;
}
AccountWebSite();

 

4 responses to “USD – Website OR Google”

  1. Hi sir, I have tried this……In my case I have found whenever there is website address was specified on the CRM Account Page, it’s showing the message “page can’t be display message” but when website address is not specified on the Account Page, it’s showing it on the Google search that’s mean, it’s working correct only in second scenario, in my case.

    Any Suggestion ?

    Like

    1. Try running in debugger and look at what the url returned is. It could be the url on your account isn’t valid. Or something like that.

      Also, you test prove the hosted controls (etc) are setup correctly by changing the scriptlet (as a test) to return a fixed url. That will tell you if there is something wrong with the url or navigation in used.

      Also, check the usd component type is set correctly on the hosted control for the webpage.

      Like

Leave a comment

Trending

Website Powered by WordPress.com.