
I'm using xrm service toolkit to set the party field value. here is what I'm doing:
var partlist = new Array();
partlist[indxAttendees] = new Object();
for (var indxAttendees = 0; indxAttendees < respondent.length; indxAttendees++) {
partlist[indxAttendees].id = respondent[indxAttendees].id;
partlist[indxAttendees].name = respondent[indxAttendees].name;
partlist[indxAttendees].typename = 'contact';
createPhCall.attributes["to"] = partlist;
}
But I could not figure it out. I need the help in this regard.
*This post is locked for comments
I have the same question (0)you have to pass entity collection has value for party list
Check the below code to set "to" in an email record
var to = [
{ id: accountId, logicalName: "account", type: "EntityReference" },
{ id: contactId, logicalName: "contact", type: "EntityReference" }
];
createEmail.attributes["to"] = { value: to, type: "EntityCollection" };