-3

I have a fetchXml using which i need to get an EntityCollection. When i googled i got results which are using a particular service class object as follows

FetchExpression fetch = new FetchExpression(fetchXml);
EntityCollection quickFindViewEntityCollection = _service.RetrieveMultiple(fetch);

I want to know to which class does this _service object belongs to. Can somebody give me the full details of this class.

Jaganmohanreddy
  • 391
  • 4
  • 19

1 Answers1

2

_service is an instance of a class which implements the IOrganizationService interface.

If your code was from a CRM plugin or custom workflow, you can create an instance of this from the context.

If your code was from an external application consuming the CRM services, then you can create use the OrganizationService class which is part of the Microsoft.Xrm.Client library.

Alessi
  • 759
  • 3
  • 11