Skip Ribbon Commands
Skip to main content
SharePoint

Use FetchXML to Retrieve CRM 2011 Records

To use FetchXML to retrieve CRM 2011 records, complete the following steps:
  1. Check out and open the process you want to edit.

  2. In the Toolbox pane, click Microsoft CRM 2011. A list of Activities is displayed.

  3. Double-click or drag the Fetch CRM 2011 Records into the process.

  4. Link the activity appropriately with other activities in the process.

  5. Right-click the Fetch CRM 2011 Records activity. A shortcut menu is displayed.

  6. Click View Properties. The Fetch CRM 2011 Records window is displayed.

  7. Click the System Resource tab. The corresponding screen is displayed.

  8. In the CRM System Resource field, click the System Resource editor icon and select the appropriate CRM 2011 system resource.

    Note:
    If you select the CRM 2011 Entity editor, you can directly select the CRM entity that you want to retrieve.
    If your system resource contains a data item in the connection string property, click Configuration values and enter a valid connection string for design-time, configuration purposes.


  9. Click the Fetch XML tab. The corresponding screen is displayed.

  10. In the Fetch XML field, type the XML code to retrieve the relevant CRM record.

    Note:
    For example, to retrieve CRM 2011 accounts and only return the name and account ID, you use the following code:
    <fetch mapping="logical">
    <entity name="account">
    <attribute name="accountid" />
    <attribute name="name" />
    </entity>
    </fetch>
    To use values stored in data items to make your query dynamic, click the Show Data Items button and double-click the relevant data items to insert them into your XML where the cursor is.


  11. Click OK. You configured the activity to use FetchXML to retrieve CRM 2011 records. You are now ready to map attributes to data items as documented in the corresponding topics in this section.
Related Topics
Populate Data Items with a CRM 2011 Attribute Value
Write the CRM 2011 Records to an XML File

Source
BPM Designer Topics > Overview of Activities and Activity Topics > Microsoft CRM 2011 Activities > Fetch CRM 2011 Records
Last modified at 7/31/2020 12:07 PM