Fetching data from the CRM database
As we discussed in an earlier topic, we have two direct methods available to get data from CRM:
Retrieve method only fetches a single record based on the primary key passed to it, but
RetrieveMultiple can fetch one or more records based on the query passed to it. To write a query for the
RetrieveMultiple method we can use the following different options:
QueryByAttribute is the simplest way to build your query to fetch data. But it does not provide options to define complex criteria to get data from the CRM. For example, the
QueryByAttribute class can't be used to get data based on a conditional operator such as: fetch ...