Skip to main content

Dynamics 365: Insert Entity

Description

Use the step to insert a record in a Dynamics 365 entity.

Note:

For lookup fields, provide the GUID of the selected target in the ‘Field Value’ column of ‘Table Fields’. You can copy GUID from address bar with format: id=c1852f57-6ab9-ec11-983f-000d3aca381e.

D365-1

Limitations: Following field types are not supported:

  • In Table Fields, PartyList and Regarding lookup field types.
  • In Table Fields, in custom lookup fields, lookup fields having different Logical names and Schema names will not work.
  • File and Image field types are not supported.

Configurations

Field nameDescription
Step nameSpecify a unique name for the step.
CONNECTION tab:Connection Fields
Base URL*Specify the base URL of the Dynamics 365 CRM instance. For example, https://XXXXX.crm8.dynamics.com
The field data type is String.
Tenant ID*Specify Tenant ID to authenticate Dynamics 365 CRM instance.
The field data type is String.
Note: To create Tenant ID refer plugin prerequisites.
Client ID*Specify Client ID to authenticate Dynamics 365 CRM instance.
The field data type is String.
Note: To create Client ID refer plugin prerequisites.
Client SecretNote: To create Client Secret, see the Prerequisites and References sections.
Accept value as variable/staticKeep the checkbox clear to accept Client Secret value from a field in the previous steps of the stream using a list. Else select the checkbox for Client Secret field to appear as Text box.
Client Secret Key*Provide the Client Secret to authenticate Dynamics 365 CRM instance. Client Secret is entered using a widget. If the checkbox is selected the Client Secret field appears as Text box and accepts static values or variables. Else if the checkbox is clear Client Secret field appears as a list to select fields from previous steps.
The field data type is String.
Note: To create Client Secret see the Prerequisites and References sections.

Test Connection: Click to verify if the connection is established or not.
Note: For the purpose of verification fields coming from previous steps are not allowed since field values can only be accessed when workflow is in running state. Static values and environment variables are allowed.
ENTITY NAME AND CRITERIA FIELDS:Entity Name and Criteria Query Fields
Entity Name*Select the Entity name to insert a record.
The field data type is String.

Note:
- User must have appropriate permissions in Dynamics365 CRM instance to update a record through ‘Dynamics 365: Update Entity’ step.
- User must be authorized to access specified entity name.
Get: Click to validate if the connection is successfully established and it populates the list of Entity names on the Dynamics 365 CRM instance.
Criteria Field*Provide a Criteria field name to search the record to be updated.
The field data type is String.
Get: Click to validate if the connection is successfully established it populates the list of fields associated with the Entity Nameon the Dynamics 365 CRM instance.
Criteria value: Value of the respective field to search the record.
- Specify a query criterion that fetches a unique record or else set ‘Update Multiple Records'=Yes.
- An invalid query criterion throws a no records found error.

See the References section.
Update Multiple RecordsAllowed Values: ‘Yes’ or ‘No’
If given ‘Yes’, multiple records matching specified criteria will be updated.
Default value: No
Accept Fields As JSON- If Checkbox is selected, the ‘JSON’ field below will be used to update the record.
- If the checkbox is not selected ‘Table Fields’ will be used to build the JSON to update the record. In this case provide at least one of ‘Variable Field Name’ or ‘Static Field Name’ and the corresponding ‘Field Value'.
JSONIn this field provide JSON in valid format to update the record.
Select a field name from the drop-down list or provide a variable; containing the JSON text.

JSON sample syntax format:
{"fieldName1":”fieldValue1”,"fieldName2":"fieldValue2", "lookupFieldName3_targetField@odata.bind": "/entitySetNameOfTarget(guidFieldValue3)", "lookupFieldName4@odata.bind": "/entitySetNameOfTarget(guidFieldValue4)"}

Sample JSON:
{"customerid_account@odata.bind":"/accounts(0faa50fe-e7d0-4e9d-bdfd-3aacc2d9cbdd)", "name":"Order8","shippingmethodcode":"4", "pricelevelid@odata.bind": "/pricelevels(10f883f4-8d0a-ea11-a811-000d3a1b1d16)"}
Table FieldsIf ‘Accept Fields As JSON’ is selected. Provide at least one 'Field Name' and 'Output Field'.
Field NameClick the cell in the input table, to populate fields associated with the entity name.
The field is mandatory and the data type is String.
Field ValueSpecify the value of therespective field associated with the Field Name.
The field is mandatory and the data type is String.
TargetsClick the cell in the input table, to populate targets associated with the FieldName.
OUTPUT tab:Output fields (Tabular)
Updated Record IDsSpecify an output field to hold valid the IDs of updated records. Default value: UpdatedRecordIDs
The field data type is String.

*indicates the field is mandatory.