Views:

Description

When using the CreateRecord or UpdateRecord functions this function allows you to set fields of type partylist.

Signature 1

SetAttributePartyList('fieldname', 'entitylogicalname', 'guid', 'guid')

Signature 2

SetAttributePartyList('fieldname', '#', 'entitycollection', 'fieldname')

Example 1

SetAttributePartyList('to',
                      'systemuser',
                      '30dd379c-4444-11db-8314-0800200c9a55',
                      '88dd379c-7777-11db-9999-0800200c9a55') 
See xRM Sample 81

Example 2

SetAttributePartyList('to',
                      'systemuser', 
                      '30dd379c-4444-11db-8314-0800200c9a55,88dd379c-7777-11db-9999-0800200c9a55') 
See xRM Sample 96

Example 3

SetAttributePartyList('to', 
                'systemuser',
                'entitycollection',
                'field_reference_from_entitycollection')
 See xRM Sample 24

Example 4

 CreateRecord('email', 
    SetAttribute('subject', 'Test Email: ' + UtcDateTime()),  
    SetAttributePartyList('to', 
                          '#',
                          FindRecordsValue(FindRecordsFD('Find Test Email'),
                                           'from'),
                                           'partyid'))

Parameters

Name Type Description Required
fieldname xxxx xxxx xxxx
entitylogicalname xxxx xxxx xxxx
guid xxxx xxxx xxxx
guid xxxx xxxx xxxx