Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

How to retrive Data from crm 2011 using web service and c#

$
0
0

Hi,

staticprivateIOrganizationServiceGetOrganisationService(){ClientCredentials credentials =newClientCredentials(); credentials.Windows.ClientCredential=newNetworkCredential("UserName","Password","Domain");OrganizationServiceProxy proxy =newOrganizationServiceProxy(newUri("http://Servername:5555/Organisation/XRMServices/2011/Organization.svc"),null, credentials,null);return proxy asIOrganizationService;}staticpublicvoidMain(){

//Initialize the Organization Service to retrieve CRM Objects

IOrganizationService service = GetOrganisationService();

// Frame the Query with Entity name, Conditions and Columns.QueryExpression query =newQueryExpression("account"); query.ColumnSet=newColumnSet(true);

//Call Retrieve Multiple method to fetch the dataEntityCollection result = service.RetrieveMultiple(query);}

I have to write the above code in my web services But i am unable to connect the crm2011 can u please suugest me.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>