Overview
A configuration is provided for establishing connections with the Microsoft Dataverse service. The configuration is used in the REST Connection Manager.
NOTE: In 1.9 and 2.0 the configuration was previously called Microsoft Common Data Service
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from service resource.
Insert data
Use REST Destination component to insert data into service resource.
Actions
Use the REST Web Service Request Task component to perform the actions mentioned below.
Check the following templates that can be copied and pasted into Javascript Task/Component leveraging REST Web Service Request Task to quickly configure and execute the desired action.
- Action Type - Close Opportunity as LOST Use this Parameterization Template
- Action Type - Close Opportunity as WON Use this Parameterization Template
- Action Type - Fulfill sales orders as COMPLETE Use this Parameterization Template
- Action Type - Fulfill sales orders as PARTIAL Use this Parameterization Template
- Action Type - Cancel sales orders Use this Parameterization Template
- Action Type - Convert sale order to invoice Use this Parameterization Template
- Action Type - Resolve Incident Use this Parameterization Template
Quick Start
Step 1. Right click Visual Studio to launch using "Run As Administrator".
Step 4. From Configuration combo box select "Microsoft Dataverse".
Step 5. Specify your instance in the Server parameter. The parameter should appear like https://[your organization instance name].crm.dynamics.com/api/data/v9.0
for an instance located in North America.
Step 7. During the token generation process you will see that client_id has a default client_id. The default client_id is an application registered by COZYROC and validated by Microsoft. The customer now has a choice for one of the following options below. Most customer's are choosing option #2 as Microsoft has not made it clear how the customer is to give the permissions for the 1st option.
1. The customer's Administrator will need to give the COZYROC application consent and then and only then can the customer proceed in the token generation wizard to give login consent to COZYROC's application.
2. Setup your own client_id, instead of using the one proviced by COZYROC. This step needs to be done to create your own client_id to connect and to be used during the token generation. The following KB article will help you setup your own client_id:
How to setup your client id to connect with COZYROC Microsoft Dataverse Connector
If you have issues generating the token, set the token wizard to use a different browser engine and be sure to launch Visual Studio using Run as Admin.
Step 10. Click "Test Connection" to test your connection.
In this guide, we will show how to read data from Microsoft Common Data Service resource using the COZYROC REST Source component.
Step 5. Click Preview to make sure all necessary resource columns are included.
Bravo! You have now learned how to read data from Microsoft Common Data Service service.
In this guide, we will show how to write data to Microsoft Common Data Service resource using the COZYROC REST Destination component.
In this guide, we will show you how to create a connection to Microsoft Common Data service using COZYROC's REST Connection Manager.
Step 1. Run "Visual Studio".
Step 4. From Configuration combo box select "Microsoft Common Data Service".
Step 5. Specify your instance in the Server parameter. The parameter should appear like https://[your organization instance name].crm.dynamics.com/api/data/v9.0
for an instance located in North America.
Step 6. Click New button to create a new token file.
Configuration
Base URL address: https://[instance]/api/data/v9.0
.
-
The authentication uses an authorized token. The token will be refreshed with the following expression:
{{=Date.now() + (response.expires_in - 300) * 1000}}
.The authentication has the following user-defined parameters:
- client_id: Required. Identifier of application that is associated with the authentication token.
- client_secret: Specify application client secret. Optional.
- tenant: Required. Specify tenant identifier.
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Bearer {{=token.Access}}
Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/authenticate-oauth.
- [Create] action
-
Endpoint URL address:
/AddListMembersList
.
The action uses POST method.The following request parameters will be automatically processed:
-
application/json:
{{=Dataverse.getListMemberPayload(item)}}
Documentation: https://community.dynamics.com/365/f/dynamics-365-general-forum/398547/web-api-how-can-i-expand-listmembers-lead-or-contact.
-
application/json:
- [Delete] action
-
Endpoint URL address:
/RemoveListMembersList
.
The action uses POST method.The following request parameters will be automatically processed:
-
application/json:
{{=Dataverse.getListMemberPayload(item)}}
Documentation: https://community.dynamics.com/365/f/dynamics-365-general-forum/398547/web-api-how-can-i-expand-listmembers-lead-or-contact.
-
application/json:
- listid
Template: ShortText.
- entityType
Template: ShortText.
- entityid
Template: ShortText.
- [Read] action
-
Endpoint URL address:
/{{=resource.external.entitySetName}}
.
The result is extracted from:{{=response.value}}
.
The result is paginated.The action has the following user-defined parameters:
- $expand: Specify for expandable property. Optional.
The following request parameters will be automatically processed:
-
$select:
{{=function() { /* var fields = resource.getFields(); return _.filter(parameters.fields, function(field) { return fields[field].external.canSelect; }).join();*/ return undefined; }()}}
-
$skiptoken:
{{=parameters.iterator}}
-
Prefer:
odata.include-annotations="OData.Community.Display.V1.FormattedValue, Microsoft.Dynamics.CRM.lookuplogicalname", odata.maxpagesize={{=parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/query-data-web-api.
- [Read FetchXml] action
-
Endpoint URL address:
/{{=resource.external.entitySetName}}
.
The result is extracted from:{{=response.value}}
.
The result is paginated.The action has the following user-defined parameters:
- FetchXml: Required. Specify FetchXML statement.
The following request parameters will be automatically processed:
-
fetchXml:
{{=Dataverse.prepareFetchXml(parameters)}}
-
Prefer:
odata.include-annotations="OData.Community.Display.V1.FormattedValue, Microsoft.Dynamics.CRM.lookuplogicalname, Microsoft.Dynamics.CRM.fetchxmlpagingcookie"
Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/retrieve-and-execute-predefined-queries#use-custom-fetchxml.
- [Create] action
-
Endpoint URL address:
.
The result is extracted from:{{=Dataverse.executeAction('create', resource, batch)}}
.The action has the following user-defined parameters:
- IgnoreNullValue: Specify to ignore NULL values and not send for processing.
- IgnoreMissingIdentifier: Specify how unrecognized lookup identifiers are to be handled. When this parameter is set to True, the component will ignore an identifier field if it does not match any entity record in the system.
- $expand: Specify for expandable property. Optional.
Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/create-entity-web-api.
- [Update] action
-
Endpoint URL address:
.
The result is extracted from:{{=Dataverse.executeAction('update', resource, batch, parameters)}}
.The action has the following user-defined parameters:
- IgnoreNullValue: Specify to ignore NULL values and not send for processing.
- IgnoreUnchanged: Specify to avoid sending fields where input data matches existing data.
- IgnoreMissingIdentifier: Specify how unrecognized lookup identifiers are to be handled. When this parameter is set to True, the component will ignore an identifier field if it does not match any entity record in the system.
- AlternateKey: Specify alternative key identifier column. Optional.
- $expand: Specify for expandable property. Optional.
Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/update-delete-entities-using-web-api.
- [Upsert] action
-
Endpoint URL address:
.
The result is extracted from:{{=Dataverse.executeAction('upsert', resource, batch, parameters)}}
.The action has the following user-defined parameters:
- IgnoreNullValue: Specify to ignore NULL values and not send for processing.
- IgnoreUnchanged: Specify to avoid sending fields where input data matches existing data.
- IgnoreMissingIdentifier: Specify how unrecognized lookup identifiers are to be handled. When this parameter is set to True, the component will ignore an identifier field if it does not match any entity record in the system.
- AlternateKey: Specify alternative key identifier column. Optional.
- DuplicateDetectionRules: Specify to update existing records using the system-defined duplicate detection rules.
- MultipleMatch: Specify how to handle multiple matches.
- $expand: Specify for expandable property. Optional.
Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/update-delete-entities-using-web-api.
- [Delete] action
-
Endpoint URL address:
.
The result is extracted from:{{=Dataverse.executeAction('delete', resource, batch)}}
.Documentation: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/update-delete-entities-using-web-api.
- @odata.etag
Template: ShortText.
- [External]
-
The external fields list is extracted from:
{{=Dataverse.getFields(resource, parameters)}}
.
The external resource list is extracted from: {{=Dataverse.getResources()}}
.
- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- Lookup
The gathered value is processed with
{{=Dataverse.getLookupValue(field, item)}}
expression. Before setting, the value is processed with{{=Dataverse.getLookupItemValue(field, value, parameters)}}
expression. Field components:-
Uses template:
ShortText
. - Contains the following components: value, entity, formatted.
-
Uses template:
- Double
Data type: DT_R8
- Boolean
Data type: DT_BOOL
- BigInt
Data type: DT_I8
- Integer
Data type: DT_I4
- Money
Data type: DT_CY
- DateTime
Data type: DT_DBTIMESTAMP
- Uniqueidentifier
Data type: DT_GUID
- Decimal
Data type: DT_DECIMAL
- Date
Data type: DT_DBDATE Before setting, the value is processed with
{{=value && dateFormat(value, 'yyyy-mm-dd')}}
expression.- Picklist
Template: ShortText. Before setting, the value is processed with
{{=Dataverse.getPicklistCode(field, value)}}
expression.
Knowledge Base
- Where can I find the documentation for the Microsoft Dataverse Connection?
- Error Message: The application asked for permissions to access a resource that has been removed or is no longer available. Contact the app vendor.
- Error Message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
- Resource not found Error or Scope is not valid while Generating the OAUTH Token for COZYROC Graph, Dataverse or Exchange Online connectors
- How to Register your app on Azure Portal Quick Start
Related scripts
What's New
- New: Defined Service authentication.
- Fixed: Field's metadata was not updated after FetchXml parameter modification (Thank you, Paul).
- New: Implemented to create OAuth2 version 2.0 access tokens.
- New: Support for FetchXml data retrieve.
- New: Support for 'continue-on-error' data processing.
- New: Support for Update/Upsert with alternate keys.
- New: Support for Upsert using 'Duplicate Detection Rules' definition.
- New: A new action parameter IgnoreNullValue to ignore NULL input values.
- New: A new action parameter IgnoreMissingIdentifier to ignore missing lookup identifiers.
- New: A new action parameter IgnoreUnchanged to avoid making updates where the input data is same as current.
- New: 'listmembers' resource for list members maintenance.
- Fixed: Corrected code for creating and updating lookup fields (Thank you, Russel).
- Fixed: Corrected code for creating and updating date fields (Thank you, Vadim).
- Fixed: Child-entities not available to update (Thank you, Ginger).
- New: Introduced connection.
Related documentation
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.