PartyList : This is a data type available in MS crm.
It is almost a lookup that can have references to more than one records of an entity for a single field.
A partylist has certain attributes like name, id, type,typename etc.
To retrieve values by jscript:
var partylistItem = new Array;
//get the items/values in a field named"resources"
partylistItem = Xrm.Page.getAttribute("resources").getValue();
Thus now the array holds all the items/record referenced for a single field
.
|
we may have a loop through this array to retrieve the values like,
partylistItem[0].id - the guid of the item.
To set values by jscript : To set values we also need to get an array. var partlistset= new Array(); partlistset[0] = new Object(); partlistset[0].id = id; // provide a guid type value partlistset[0].name = name; // provide a suitable name partlistset[0].entityType = entityType; // provide the entity name of the item ie account/ contact etc . Xrm.Page.getAttribute("resource").setValue(partlistset);
The following table lists the activity party types that are supported
for each activity, and the corresponding activity properties to specify
those activity party types.
|
Thanks.
|