# Microsoft Dynamics CRM — CRM API: gotchas

> Canonical URL: https://developers.apideck.com/apis/crm/microsoft-dynamics/gotchas

## GET /crm/companies

Microsoft Dynamics 365 does not include a total record count in default list responses. `meta.total_count` will not appear. Surfacing the total requires adding `$count=true` to the OData query or calling a separate `$count` endpoint — not currently implemented.

## POST /crm/companies

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

`parent_id` sets the account's Parent Account at creation. An empty string or `null` is
treated as omitted, and the account is created without a parent. If `parent_id` names an
account that does not exist, Dynamics rejects the entire create and no company is created.

## PATCH /crm/companies/{id}

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

`parent_id` sets, changes or removes the account's Parent Account. Send an account id to
set or change the parent, `null` to remove it, and omit the field to leave the current
parent untouched. An empty string is treated as omitted, not as a request to remove the
parent. Unlike lookup custom fields, `parent_id` can be cleared with `null`.

If `parent_id` names an account that does not exist, or would make an account its own
parent or ancestor, Dynamics rejects the entire update.

## GET /crm/contacts

Microsoft Dynamics 365 does not include a total record count in default list responses. `meta.total_count` will not appear. Surfacing the total requires adding `$count=true` to the OData query or calling a separate `$count` endpoint — not currently implemented.

## POST /crm/contacts

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

## PATCH /crm/contacts/{id}

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

## POST /crm/opportunities

The `primary_contact_id` is required in the request body
## POST /crm/opportunities

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

## PATCH /crm/opportunities/{id}

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

## GET /crm/leads

Microsoft Dynamics 365 does not include a total record count in default list responses. `meta.total_count` will not appear. Surfacing the total requires adding `$count=true` to the OData query or calling a separate `$count` endpoint — not currently implemented.

## POST /crm/leads

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

## PATCH /crm/leads/{id}

Entity Reference (lookup) custom fields are written using Dataverse navigation-property
syntax automatically: supply the custom field id as either the read-side `_<attribute>_value`
form or the bare attribute logical name, with the target row GUID as the value, and the
connector emits `<navigationProperty>@odata.bind` for you.

Two limitations: polymorphic multi-target lookup columns (e.g. Customer-type columns
targeting both accounts and contacts) cannot be auto-resolved from a bare GUID — the request
fails with an actionable error; write those via pass_through with an explicit
`<navigationProperty>@odata.bind` key. Clearing a lookup custom field by sending a null
value is not supported.

## GET /crm/notes

Microsoft Dynamics 365 does not include a total record count in default list responses. `meta.total_count` will not appear. Surfacing the total requires adding `$count=true` to the OData query or calling a separate `$count` endpoint — not currently implemented.

## GET /crm/users

Microsoft Dynamics 365 does not include a total record count in default list responses. `meta.total_count` will not appear. Surfacing the total requires adding `$count=true` to the OData query or calling a separate `$count` endpoint — not currently implemented.

## GET /crm/activities

Microsoft Dynamics 365 does not include a total record count in default list responses. `meta.total_count` will not appear. Surfacing the total requires adding `$count=true` to the OData query or calling a separate `$count` endpoint — not currently implemented.


[API reference](https://developers.apideck.com/apis/crm/reference.md) · [Coverage matrix](https://developers.apideck.com/apis/crm/coverage)
