MS Dynamics Crm 2016 connection and retrive multiple data

This feature came to ms dynamics crm 2016 SDK and using to Microsoft.Xrm.Tooling.Connector.dll


static void Main(string[] args)
{
    IOrganizationService service;
    CrmServiceClient crmSvc = null;

    crmSvc = new CrmServiceClient(new System.Net.NetworkCredential("username", "password", "domain"), AuthenticationType.AD, "organizationurl", "443", "organizationname", useUniqueInstance: false, useSsl: true);

    service = crmSvc.OrganizationServiceProxy;

    QueryExpression qe = new QueryExpression();
    qe.ColumnSet = new ColumnSet(true);
    qe.EntityName = "account";
    qe.Criteria = new FilterExpression();
    qe.Criteria.AddCondition(new ConditionExpression("name", ConditionOperator.Equal, "huseyin"));

    var list = service.RetrieveMultiple(qe);
}

 

 

Advertisements

#c, #console, #crm, #dynamics-crm, #dynamics-crm-2016, #retrieve-multiple-data-2016