upsert_record
Create or update a Dataverse record by GUID with modes for createOrUpdate, createOnly, or updateOnly behavior.
Instructions
Create or update a Dataverse record with a known GUID (PUT semantics). Use mode='createOrUpdate' to create if not exists, update if exists. 'createOnly' fails if the record exists. 'updateOnly' fails if it does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Key-value pairs of Dataverse field names and their values. For lookup (navigation) fields, use OData bind annotation syntax: { "fieldname@odata.bind": "/entitysetname(guid)" } — e.g. { "parentbusinessunitid@odata.bind": "/businessunits(3c359494-abcd-1234-0000-000000000000)" }. Use describe_table to find the field type ('LookupType') and targets; use list_tables or describe_table on the target entity to find its entitySetName. | |
| mode | No | Upsert behavior. Default: createOrUpdate. | createOrUpdate |
| recordId | Yes | GUID of the record, e.g. '00000000-0000-0000-0000-000000000000' | |
| tableName | Yes | Logical (schema) name of the Dataverse table, e.g. 'account' or 'crb69_myentity' |