O'Reilly logo

Microsoft Dynamics CRM 2013 Unleashed by Marc Wolenik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

RetrieveMultiple Method

The RetrieveMultiple method gets one or more than one instance of an entity.

For example, you can use this method as shown in Listing 24.4 to retrieve all the Accounts for an organization.

LISTING 24.4 Retrieve an Organization’s Accounts

private static void GetAllAccounts(string organizationName)         {             using (XrmSdk.OrganizationServiceClient myCrm =  new XrmSdk. OrganizationServiceClient())             {                 try                 {                     myCrm.Endpoint.Address =               new System.ServiceModel.EndpointAddress               (GetCrmServiceForOrganization(organizationName));                     myCrm.ClientCredentials.Windows.ClientCredential =

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required