UpdateMscrmRecords()

Updates one or more records in a Microsoft Dynamics CRM entity, and returns the number of successfully updated records.

The UpdateMscrmRecords() function has four parameters:

  • entityName (string): Required. The name of the Microsoft Dynamics CRM entity that contains the records to update.
  • guidsToUpdate (string): Required. A comma-separated list of GUIDs to update.
  • attributeName1 (string): Required. The name of the attribute to update on the target records.
  • attributeValue1 (string): Required. The attribute value to update on the target records.

You can pass multiple name-value pairs for attributes by appending them to the end of the function (attributeName2, attributeValue2 ...).

This example changes the value of the Lead Source Code attribute to "Web" for several records.

The example outputs the number of updated records.