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.
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:
statusToSet(string): Required. The status to set for the record. Accepted values:
-1. A value of
-1resets the status to its default value.
This example changes the state of an account to inactive.
The function doesn’t return a value.