Table of Contents

drm.crmbaseentity default template reference

API Version: 2023-01-09

drm.CrmBaseEntity type entities wraps many of the Dynamics Web API entities

For a full list of supported Dynamics web api entities that can be used by DRM Templates click here.

Template format

To target a drm.crmbaseentity/{collection}, add the following JSON to your template.

Note

The placeholder {collection} should be replaced by any of the names from this list depending on which Dynamics entity you are targeting.

{
   "targetenvironment": {
     "bearerToken": "string", 
     "userCredentials": { 
         "username": "string", 
         "password": "string", 
         "clientId": "string", 
         "tenantId": "string" 
     }, 
     "applicationCredentials":{ 
         "clientId": "string", 
         "clientSecret": "string", 
         "tenantId": "string" 
     }, 
     "url": "string" 
   },
   "queries": {
     "{queryPropertyName}": {
        "entity": "string",
        "filter": "string"
     }
   },
   "type":"drm.crmbaseentity/{collection}",
   "apiVersion":"2023-01-09",
   "name":"string",
   "properties":{
      "data":[
         {
            ...
         }
      ]
   }
}

Property values

The following tables describe the values you need to set in the schema.

drm.crmbaseentity/{collection} object

Name Type Required Value
targetenvironment object Yes Object containing Dynamics connection information.
queries object No Object containing queries to run against your target Dynamics environment. queries object
name string Yes The name of the resource block being deployed. Used to easily identify the resource in deployment logs.
type enum Yes drm.crmbaseentity/{collection} Where collection is one of the known collection names.
apiVersion enum Yes 2023-01-09
properties object Yes The parameters used to patch a collection
{data} object

queries object

Name Type Required Value
{queryPropertyName} object Yes The name of the query, this will be used to reference the results in the template. query filter object

queries filter object

Name Type Required Value
entity string Yes The name of the entity you are targeting. See this list for a collection of supported entities
filter string Yes The Odata based filter string.

data parameters

Name Type Required Value
data array Yes An array of the entity rows to update. See this list for a collection of supported entities.

targetenvironment object

Name Type Required Value
bearerToken string No A bearer token
userCredentials object No User credential details
UserCredentials object
applicationCredentials object No App registration details
ApplicationCredentials object
url string Yes The url of the Dynamics instance

ApplicationCredentials

Name Type Required Value
clientId string Yes Application client id
clientSecret string Yes Application client secret
tenantId string Yes Tenant id where registered application resides

UserCredentials

Name Type Required Value
username string Yes Email address of the user account
password string Yes Password of the user account
clientId string Yes Application client id
tenantId string Yes Tenant id where registered application resides