Views:

Description

Updates a record within the system if the record exists.

You enter the name of the entity and then the record guid that you want to update. If the record guid is null or empty nothing will happen (i.e. NoOp returned) . And after this a list of all the attributes you want to set.

Signature

UpdateRecordIfExists('entityname', 
                     'primarykeyid',
                      SetAttribute('attributename', 'attributevalue' ))

Example

UpdateRecordIfExists('contact',
                      [account.primaryaccountid],
                      SetAttribute('firstname', 'Bill'),
                      SetAttribute('lastname', 'gates'),
                      SetAttribute('creditlimit', '5000'),
                      SetAttribute('description', '?'),
                      SetAttributeCustomer('parentcustomerid', 
                                           'account', 
                                           '450dd379c-ee2f-11db-8314-0800200c777',
                                           'Microsoft'),
                      SetAttributeLookup('preferredsystemuserid', 
                                         'systemuser',
                                         '670dd379c-ee2f-11db-8314-0800200c888'))


Note 1: Fields of type lookup need SetAttributeLookup('fieldname', 'entityname', 'recordguid')
Note 2: Fields of type PartyList need SetAttributePartyList('fieldname', 'entityname', 'partyguid' , 'partyguid')

Parameters

Name Type Description Required
entityname xxxx xxxx xxxx
primarykeyid xxxx xxxx xxxx
SetAttribute xxxx xxxx xxxx