web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :

Set Party List field using JavaScript in Dynamics CRM

Community Member Profile Picture Community Member

Introduction:

In this blog, we are going to discuss how to set a party list field using JavaScript in Dynamics CRM. Many times, there is a requirement that any email send from CRM must be send from a specific user, irrespective of the user logged in to CRM.

Scenario:

In the Incident Management, there is a need that each mail send from CRM to Customers must be send from Support User.

Steps:

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[0] = new Object();
partylistData[0].id = queue.value[0].queueid; partylistData[0].name = queue.value[0].name; partylistData[0].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.

The post Set Party List field using JavaScript in Dynamics CRM appeared first on CloudFronts - Microsoft Dynamics 365 | Power BI | Azure.

Comments

*This post is locked for comments