28 Apr’17

D365 GeneralSet Party List field using JavaScript in Dynamics CRM


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.


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[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.

Written by

Krishna Bhanushali

Software Developer

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Reading more then 10K records in D3FOE OData API

    11 July’ 2018

    Introduction: We all know Dynamics 365 Finance and Operations has limitation of 10K records to be fetched at a time usi...

    Read more
  • Paging in D365 Customer Engagement v9.0

    10 July’ 2018

    Introduction: The Xrm.retrieveMultipleRecords method is used to retrieve a collection of records in Dynamics 365 Custom...

    Read more
  • Set up Dynamics 365 connection in Microsoft Social Engagement

    10 July’ 2018

    Introduction: This blog explains how to Set up Dynamics 365 connection in Microsoft Social Engagement. Steps to be follo...

    Read more
  • Voice of the Customer failed to install

    10 July’ 2018

    Introduction: Many people face issues in installing Voice of Customer solution on v9 environment and trying repeatedly ...

    Read more
  • Scribe Insight AX as a Web Service Find Block issue

    10 July’ 2018

    Introduction: If we need to look up for any value from AX then we do it by using a Find Block in Scribe Insight Eg: Basi...

    Read more