Archive
Field value null check in USD
We have configured ‘Session Overview Line’ for ‘Account’ entity which would come as below.
However, for few Accounts, ‘Session Overview Line’ was not loading and it even breaking further USD configurations.
Reason:
- Few ‘Account’ fields specified in ‘Display’ of ‘Session Line’ are Null which prevented ‘Session Overview Line’ load.
Fix:
- Add ‘Null Check’ (i.e., Suffix + operator) while defining fields in “Session Overview Line”.
Ex:
Text=”Annual Revenue: [[account.revenue]x+]”
Text=”Account Name: [[account.name]x+]”
Text=”Primary Contact: [[account.primarycontactid.name]x+]”
🙂
Denote an Unsaved record in a Session – USD
We got a requirement to denote an unsaved record with * in a session.
Below is the scenario.
- User opens an Account record in USD
- USD opens a new Account Session
- User clicks ‘Create Task’ link from Agent Script.
- System should display * on ‘Task’ Tab until it gets Saved.
It’s very easy to achieve using ‘Scriptlet’.
Add a Scriptlet “SetTaskTitle” and set to the hosted control’s Display name (i.e., [[$Scriptlet.SetTaskTitle]] )
In the “SetTaskTitle” Scriptlet
- if Task.Subject == “”
- Set DisplayName=”Task *”
- Else
- Set DisplayName=”Task.Subject”
Script Text:
function SetTaskTitle() {
if (“[[task.subject]+]” != “”) {
return “[[task.subject]+]”;
}
else
return “Task *”;
}
SetTaskTitle();
Once the Task gets Saved, Tab name changes to ‘Task.Subject’
🙂
Create an Incoming Phone Call Activity when a Call received from CTI – USD
In one of our requirement, we had to create a new “Incoming Phone Call” activity against the calling ‘Contact’, whenever a call received.
In this article, I am using “CTI Simulator” (Download) to generate an incoming call.
Refer MSDN article contains a Walkthrough on how to
- Catch the phone call (Triggered from Simulator)
- Search ‘Contacts’ in CRM with the ‘Phone number’
- If match found, open the ‘Contact’ in USD.
Open Calling Contact Record in USD
- In USD configurations in CRM, create a “Windows Navigation Rule”, to open a ‘Contact’ record, if there is a Contact with incoming phone number.
- In the Action Call “Show tab for Contact”, we set focus on ‘Contact’ which was opened in USD.
Create Phone Call Activity
- Now coming back to our requirement, we need to create an “Incoming Phone Call” for the matched ‘Contact’, which got opened in USD.
- To achieve this, create a Sub Action Call “AC Create Contact Inbound Phone call”, under “Show tab for Contact”.
- In “AC Create Contact Inbound Phone call”, define a “CreateAction” to create “Phone Call” copying information from “Contact”.
- Data:
LogicalName=phonecall
directioncode=Boolean(false)
subject=Inbound Phonecall to [[$User.fullname]]
from=PartyList(er[“contact”,[[contact.Id]+]])
to=PartyList(er[“systemuser”,[[$User.systemuserid]+g]])
phonenumber=[[cti.phonenumber]]
regardingobjectid=EntityReference(contact,[[contact.Id]])
- The ‘AC Create Contact Inbound Phone call‘ action call triggers after ‘Show tab for Contact‘ and a new ‘Phone Call’ gets created.
🙂
‘http://event’ pop-ups with hosted controls of Hosting type ‘IE Process’ – USD
In my USD, I have a hosted control of type “IE Process”.
Whenever it gets loaded, I was getting “http://event” IE pop-up and its blocking configured events of Hosted control to be triggered.

http://event popup
Reason:
- These popups occur in IE 11
- When the protected mode of IE set to ‘Off’ for the Intranet Zone, which is a default setting of IE.
Fix:
- Either change the “Hosting Type” of hosted control to “Internal WPF” (or)
- ‘Turn On’ the protected mode for the Intranet zone.
Refer this article for more info.
🙂
Trigger USD event from CRM Hosted Control’s Jscript
In one of our requirement we had to trigger a USD Event from CRM Hosted Control’s onchange event of an option set.
Below are the steps to invoke USD event from option set’s ‘onchange’ event.
- Assume your USD event name is “USDOnChange”
- In my CRM Hosted Control’s onchange event placed this statement
function TriggerUSDOnchangeEvent() {
window.open(“http://event/?eventname= USDOnChange“);
}
🙂
‘Saved’ event not triggering on ‘CRM Page’ hosted control – USD
We have an Account form hosted in ‘CRM Page’ hosted control on USD. We got a requirement to navigate another page on CRM form Save event.
Below are the steps I initially followed
- Created a new Hosted Control of type ‘CRM Page’
- Go to ‘Events’ from Command Bar and open ‘Saved’ event
- On ‘Saved’ event of Hosted Control, added a new ‘Action’ to Navigate to Bing
- Save and close
- Open the USD and open ‘Account’ record
But the ‘Saved’ event did not trigger when I click Save button from CRM page.
Reason –
- Looks like this is known issue with my USD version (Got fixed in latest USD version)
Fix –
To fix this, below are workaround steps to hook the ‘Saved’ event to CRM hosted control.
- Open ‘PageLoadComplete’ event of Hosted Control
- Create a new ‘Action Call’
- Action : ExecutionTimeout (Note : Create a new UII action if you can’t find ExecutionTimeout)
- Data : milliseconds=6000
- Create a new ‘Sub Action Call’
- Add below Script using ‘RunXrmCommand’ Action
Script :
function hookSavedEvent(execContext)
{
window.open(“http://event/?eventname=Saved”); // notify USD of save
setTimeout(“top.ScanForData();”, 4000);
}
// Add ‘hookSavedEvent’ to Save event of CRM form
Xrm.Page.data.entity.addOnSave(hookSavedEvent);
- Save & Close the forms
- Close and reopen the USD client application to test the behavior now
- Open ‘Account’ form, click on ‘Save’
- We get a new tab with Bing page
🙂
How to change Organization in Unified Service Desk (USD) Logon application
We can switch to other Organizations from “USD Logon Application” as below.
- While launching the ‘USD Logon application’, before it loads, click on ‘Change Credentials’ link
- Now you get USD Login screen as below. Provide the Organization details you would like to connect
🙂