Here is the code to set the party list values using java script.
Party List is a data type in CRM, using which you can set more than one records of an entity for a single field.
Part List type field, renders as Lookup on the form, but it works as multi select lookup
var partyRequired = Xrm.Page.getAttribute(“to”);
// Create new array
var partlist = new Array();
partlist = new Object();
partlist.id = Id; //Guid (i.e., Guid of User or Contact etc)
partlist.name = “Name”; //Name (i.e., Name of User or Contact etc)
partlist.entityType = “systemuser”; //entity schema name of account or contact
// Set array value
Hope this helps