Wednesday, 26 August 2015

How to trigger an Unified Service Desk event onChange of CRM field--Unified Service Desk (USD)

 We got a requirement in my previous project. Onchange of CRM field value we wanted to trigger USD event. So we have approached in bellow way.

1. Click On Events


2.Create an Event in USD with name "OnChange"


3. Call your Action call to perform some Action when it is triggerd. If it is already exist select from the list. If not Create new by clicking "New" at the Corner.

 4. You can see that Action call added to event and Click on Hosted Control "Incident"

 5. navigate to Events of the Hosted control

6. Here we Can see Onchange event which we Created.
now Click On PageLoadcomplete event
7. We can see that there is no Action Calls at PageLoadComplete 


8. Create Action call with Action  RunXrmCommand by clicking "New"


9. In "Data"  Write the bellow code




function hookonchange()
{
window.open("http://event/?eventname=OnChange");
}
Xrm.Page.data.entity.attributes.get("yourfieldname").addOnChange(hookonchange);

No comments:

Post a Comment