28 Apr’17

Dynamics 365, EnterpriseSet 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

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more