Sunday, January 15, 2012

getting the simple OrganizationServiceProxy Service in MS CRM 2011

 this may help in creating console applications, to test few things before putting in plugin or nay type of interface dlls.
just to test we can create a console application and try the scenarios as possible.
to do so we can create the service object of "OrganizationServiceProxy" as follows
add the corresponding the namespaces...

ClientCredentials creds = new ClientCredentials();
creds.UserName.UserName = "<username>";
creds.UserName.Password = "<password>";
IOrganizationService service = new OrganizationServiceProxy(new Uri("http://<serverName>:<portNumber>/<orgName>/XRMServices/2011/Organization.svc"), null, creds, null);

then u can use the service object to execute,create,update or delete functions.



No comments:

Post a Comment