PartyList

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.length – gives how many records are referenced.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.

Activity entity nameSupported activity party typeActivity attributeAppointmentOptionalAttendeeOrganizerRequiredAttendeeAppointment.OptionalAttendeesAppointment.OrganizerAppointment.RequiredAttendeesCampaignActivityPartnerSenderCampaignActivity.PartnersCampaignActivity.FromCampaignResponseCustomerPartnerFromCampaignResponse.CustomerCampaignResponse.PartnerCampaignResponse.FromEmailBccRecipientCcRecipientSenderToRecipientEmail.BccEmail.CcEmail.FromEmail.ToFaxSenderToRecipientFax.FromFax.ToLetterBccRecipientSenderToRecipientLetter.BccLetter.FromLetter.ToPhoneCallSenderToRecipientPhoneCall.FromPhoneCall.ToRecurringAppointmentMasterOptionalAttendeeOrganizerRequiredAttendeeRecurringAppointmentMaster.OptionalAttendeesRecurringAppointmentMaster.OrganizerRecurringAppointmentMaster.RequiredAttendeesServiceAppointmentCustomerResourceServiceAppointment.CustomersServiceAppointment.Resources 
Thanks.

Leave a comment