> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useparagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# New Record

> Trigger when a new Dynamics 365 record is created

## Subscribe

Send this request body to [Subscribe to a Trigger](/actionkit/triggers/api-reference/subscribe-to-trigger) to start listening for this event on behalf of your user:

```http Subscribe Request theme={null}
POST https://actionkit.useparagon.com/projects/{project_id}/trigger-subscriptions

Authorization: Bearer {Paragon User Token}
Content-Type: application/json

{
  "integration": "microsoftDynamics",
  "type": "MICROSOFT_DYNAMICS_TRIGGER_RECORD_CREATED",
  "parameters": {
    "mdEntity": "Opportunity",
    "filterFormula": {
      "operator": "OR",
      "conditions": [
        {
          "operator": "AND",
          "conditions": [
            {
              "field": "name",
              "operator": "$stringExactlyMatches",
              "value": "example-value"
            }
          ]
        }
      ]
    }
  }
}
```

**Configuration options:**

<ParamField path="mdEntity" type="ENUM" required>
  Choose an entity

  * Allowed values: Opportunity (`Opportunity`), Account (`Account`), Contact (`Contact`), Lead (`Lead`), Call (`Call`), Meeting (`Meeting`), Task (`Task`), Note (`Note`), Custom Entity (`<specified by entity property>`)
  * Options can be loaded by using the `cachedCustomEntities` key. Learn more in [User Configuration](/actionkit/triggers/user-configuration).
</ParamField>

<Accordion title="When Opportunity is selected">
  Additional options when this parameter is set to `Opportunity`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `name`, `customerid`, `salesstagecode`, `estimatedclosedate`, `actualclosedate`, `estimatedvalue`, `description`, `_ownerid_value`, `transactioncurrencyid`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Account is selected">
  Additional options when this parameter is set to `Account`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `name`, `_ownerid_value`, `websiteurl`, `telephone1`, `description`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Contact is selected">
  Additional options when this parameter is set to `Contact`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `firstname`, `lastname`, `emailaddress1`, `telephone1`, `jobtitle`, `description`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Lead is selected">
  Additional options when this parameter is set to `Lead`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `subject`, `firstname`, `lastname`, `emailaddress1`, `telephone1`, `websiteurl`, `jobtitle`, `salesstagecode`, `description`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Call is selected">
  Additional options when this parameter is set to `Call`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `subject`, `directioncode`, `_regardingobjectid_value`, `phonenumber`, `actualdurationminutes`, `description`, `scheduledend`, `prioritycode`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Meeting is selected">
  Additional options when this parameter is set to `Meeting`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `subject`, `scheduledstart`, `scheduledend`, `_regardingobjectid_value`, `location`, `description`, `prioritycode`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Task is selected">
  Additional options when this parameter is set to `Task`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `subject`, `_regardingobjectid_value`, `scheduledend`, `_ownerid_value`, `prioritycode`, `description`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Note is selected">
  Additional options when this parameter is set to `Note`.

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields: `_objectid_value`, `subject`, `notetext`
    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>

<Accordion title="When Custom Entity is selected">
  Additional options when this parameter is set to `<specified by entity property>`.

  <ParamField path="customMdEntityName" type="TEXTAREA" required>
    The Entity Set Name of the Object. Use Connect Portal Workflow Settings to allow users to select a Custom Object.

    * Example value: `entitysetname`
  </ParamField>

  <ParamField path="filterFormula" type="CONDITIONAL">
    Search for records that match specified filters.

    * Supported filter fields are loaded from `cachedFields` after selecting `mdEntity`.
    * Supported operators: `$stringExactlyMatches`, `$stringDoesNotExactlyMatch`, `$stringContains`, `$numberLessThan`, `$dateTimeBefore`, `$numberEquals`, `$dateTimeEquals`, `$numberGreaterThan`, `$dateTimeAfter`, `$numberDoesNotEqual`, `$numberGreaterThanOrEqualTo`, `$numberLessThanOrEqualTo`, `$booleanTrue`, `$booleanFalse`
  </ParamField>
</Accordion>
