Summary
AddMscrmListMember()
CreateMscrmRecord()
DescribeMscrmEntities()
DescribeMscrmEntityAttributes()
RetrieveMscrmRecordsFetchXml()
RetrieveMscrmRecords()
SetStateMscrmRecord()
UpdateMscrmRecords()
UpsertMscrmRecord()
Sets the state and status of a Microsoft Dynamics CRM record.
Some entities, including Opportunity, require special CRM requests to change their state. This function doesn’t work for those entities.
Note
| Marketing Cloud Engagement | ✅ Yes |
| Marketing Cloud Next | ❌ No |
1SetStateMscrmRecord(recordGuid, entityName,
2 stateToSet, statusToSet)The SetStateMscrmRecord() function has four parameters:
recordGuid (string): Required. The GUID of the record to set the state and status of.entityName (string): Required. The name of the Microsoft Dynamics CRM entity.stateToSet (string): Required. The state to set for the record. Accepted values: active or inactive.statusToSet (string): Required. The status to set for the record. Accepted values: 0, 1, or -1. A value of -1 resets the status to its default value.This example changes the state of an account to inactive.
1%%[
2 SetStateMscrmRecord("679ab01a-e998-4e4f-b5e6-a49bcef99c76", "account", "Inactive", "-1")
3]%%The function doesn’t return a value.