Skip to main content

Data Operations

Data operation steps interact with Dynamics 365 data—creating, reading, updating, and deleting records.

Save Entity

Creates a new record or updates an existing record in Dynamics 365.

ParameterDescription
EntityThe entity record to save (with field values set)
Reload Entity After SaveWhether to reload the entity with server-generated values after saving

When Reload Entity After Save is enabled, the step returns the entity with any server-generated values (such as auto-numbers, calculated fields, or plugin-modified values).

Use Cases:

  • Create a new Account when a lead is qualified
  • Update Contact information after form submission
  • Create related records as part of a workflow

Example:

SAVE ENTITY
Entity: Account
Data: {
Name: "Contoso Ltd",
Industry: "Technology",
Revenue: 5000000
}
Reload Entity After Save: true
→ Store in variable: NewAccount

Delete Entity

Removes a record from Dynamics 365.

ParameterDescription
EntityThe entity type to delete from
Entity IDThe unique identifier of the record to delete

Use Cases:

  • Remove temporary or draft records
  • Clean up related records when parent is deleted
  • Implement data retention policies

Example:

DELETE ENTITY
Entity: Task
Entity ID: TaskToDelete.Id

Get Entity by ID

Retrieves a single record by its unique identifier.

ParameterDescription
EntityThe entity type to retrieve
Entity IDThe unique identifier of the record

Returns: The complete record with all fields

Example:

GET ENTITY BY ID
Entity: Contact
Entity ID: ContactId
→ Store in variable: CustomerContact

Execute Query

Retrieves records matching specified criteria.

ParameterDescription
MultiplicitySingle (returns one record) or Multiple (returns collection)
EntityThe entity type to query
Query ConditionsFilter conditions to match records

Returns: A single record or collection of matching records (based on Multiplicity)

Example - Single Record:

EXECUTE QUERY
Multiplicity: Single
Entity: Account
Conditions: AccountNumber == "ACC-001"
→ Store in variable: FoundAccount

Example - Multiple Records:

EXECUTE QUERY
Multiplicity: Multiple
Entity: Contact
Conditions: ParentCustomerId == AccountId AND Status == "Active"
→ Store in variable: ActiveContacts

Execute Multiple Requests

Performs multiple data operations in a single batch for better performance.

ParameterDescription
Entities to CreateCollection of records to create
Entities to UpdateCollection of records to update
Entities to DeleteCollection of records to delete

This step is particularly useful when you need to perform many operations at once, as it reduces the number of round trips to the server.

Example:

EXECUTE MULTIPLE REQUESTS
Entities to Create: NewTasksList
Entities to Update: ModifiedContactsList
Entities to Delete: ObsoleteRecordsList

Add Entity Annotation

Adds a note or attachment (annotation) to a record.

ParameterDescription
EntityThe entity type of the record
Entity IDThe record to annotate
SubjectThe note subject
Note TextThe note content
Is DocumentWhether this annotation includes a file attachment
File NameName of the attached file (if Is Document is true)
Document BodyBase64-encoded file content (if Is Document is true)

Example - Adding a Note:

ADD ENTITY ANNOTATION
Entity: Account
Entity ID: Customer.Id
Subject: "Credit Check Complete"
Note Text: "Customer passed credit verification on " + TODAY()
Is Document: false

Example - Adding an Attachment:

ADD ENTITY ANNOTATION
Entity: Quote
Entity ID: Quote.Id
Subject: "Signed Contract"
Is Document: true
File Name: "Contract_Signed.pdf"
Document Body: FileContent

Best Practices

Use Reload Wisely: Only enable "Reload Entity After Save" when you need server-generated values. It adds an extra database call.

Batch Operations: When performing many similar operations, use Execute Multiple Requests instead of multiple individual Save/Delete steps.

Handle Missing Records: When using Get Entity by ID or Execute Query (Single), consider what happens if no record is found. Use a Condition step to check for null results.

Optimize Queries: Use specific filter conditions in Execute Query to minimize the number of records returned. Avoid retrieving more data than needed.