Archive
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.
🙂
Set Regarding Lookup and open a new Task form – USD
I was exploring USD and tried below scenario.
From a new Account Session
- Add a ‘Create Task’ Agent Script Answer.
- On click, open Task form in a new Tab, pre-populated with ‘Regarding’ lookup with Account.
I had a tough time to set ‘Regarding’ look up with ‘Customer’ using ‘New_CRM_Page’ UII Action.
I could achieve with ‘Navigate’ UII Action.
In the URL, I read Account details from Context and set
- regardingobjectid = Account GUID
- regardingobjectidname = Account Name
- regardingobjecttypecode = Schema Name
URL:
/main.aspx?etn=task&extraqs=regardingobjectid%3D[[$Context.Id]u+]%26
regardingobjectidname%3D[[$Context.name]u+]%26regardingobjecttypecode
%3D[[account.LogicalName]u+]&pagetype=entityrecord&navbar=off&cmdbar=false
Exclude “navbar=off&cmdbar=false” from URL, if you want CRM tool bar on the new ‘Task’ form.
🙂