In the Incident Management, there is a need that each mail send from CRM to Customers must be send from Support User.
Step 1: Write a function on load of email form. Retrieve the Queue or User you want to set from Web API
Step 2: Party List basically consists of User or a Queue. So, we can set User or a Queue in party list. You can differentiate the User and Queue by specifying the Entity Type.
a. Queue: “queue”
b. User: “systemuser”
Code is given below:
var partylistData = new Array(); partylistData = new Object(); partylistData.id = queue.value.queueid; partylistData.name = queue.value.name; partylistData.entityType = "queue"; Xrm.Page.getAttribute("from").setValue(partylistData);
More validation can be set on basis of the requirements. On the status of the email validation can be done.
Liked it? Share it.