Get Data from a Dynamics CRM Entity with SQL Query

Use the SQL Query activity to create a simple SQL query, and get the records from one entity for Dynamics CRM.

To create a SQL query to get records from Dynamics CRM, do the procedure in this topic.

Query Entity Configuration Screen



Prerequisites

Good to Know

How to Start

  1. On the Organizer, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In the Process Builder, in the Activity Library, open the Dynamics CRM tab.
      2. On the Dynamics CRM tab, drag the Query Entity (Dynamics CRM) activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.
  3. Click Query Entity .

Procedure

  1. On the Query Entity Configuration screen, in the Dynamics CRM field, select your Dynamics CRM access token.

    To create a new access token, click Add Token . For more information, refer to New Dynamics CRM Access Token.

  2. In the Entity Name list, select your entity.
  3. On the Columns tab, complete these fields:
    Field Name Definition

    Configured Column Fields

    Use the right arrow button to move the selected fields from the Entity Column Fields list to the Configured Column Fields list.

    To select more than one field, press and hold the Ctrl key when you click the field names.

  4. On the Where tab, create your query with the Column, Comparer, and Value field.

    Example:

    Field Name Value

    Column

    accountid

    Comparer

    Equal

    Value

    123

    Select accountcategorycode, accountcategorycodename, accountid from Account  where accountid Equal '123'
  5. On the Output Mapping tab, select Map Response to AgilePoint Schema.
  6. Click the Ellipses button.
  7. On the Schema Mapper screen, map the response columns to the schema elements.
  8. To do a test for your query, on the Test tab, click Execute Query. Fix any errors that occur.