CRM 4.0
Context
Use the Fetch a CRM Entity Activity to fetch multiple Dynamics CRM entities in XML format in a workflow. For system performance considerations, use this activity to fetch a large number of entities.
Use Cases
- Real world uses cases that help customers understand functionality. Sometimes a screenshot of the activity in a workflow (with meaningful element names) is best.
Wizard Tips
- In the left pane of the Request section, click fetchXML.
- In the right pane of the Request section, In the Value text box, enter an XML-based expression for the entities you want to retrieve. You can manually enter an expression and select it from a workflow field, or base the value on a workflow expression.
Wizard Example
- Retrieve all leads.
"<fetch mapping=""locigal"">"+"<entity name=""lead"">+"<all-attributes/>"+"</entity>"+"</fetch>"
- Retrieve all accounts in which the lastname does not equal Smith.
"<fetch mapping-""logical"">"+"<entity name=""account"">" +"<attribute name=""accountid""/>"+"<attribute name=""name""/>" +"<link-entity name=""systemuser""to=""owninguser""> +"<filter type=""and"">"+"<condition attribute=""lastname"" operator=""ne"" value=""Smith""/>" +"</filter>"+"</link-entity>"+"</entity>"+"</fetch>"