Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

How to change MSCRM 4.0 Code to MSCRM 2013 relative coe using late bound.

$
0
0

HI All,

I am having the below code to be change as part of MSCRM 2013 code.

Below code is from the old code of MSCRM 4.0.

Kindly help me on this

===========================================================

using (new Microsoft.Crm.Sdk.CrmImpersonator())
{
Microsoft.Crm.Sdk.CrmAuthenticationToken token;
if(!offline)
token = Microsoft.Crm.Sdk.CrmAuthenticationToken.ExtractCrmAuthenticationToken(context, organisation);
else
token = new Microsoft.Crm.Sdk.CrmAuthenticationToken();
token.OrganizationName = organisation;
//token.AuthenticationType = 0;
Microsoft.Crm.SdkTypeProxy.CrmService service = new Microsoft.Crm.SdkTypeProxy.CrmService();
service.CrmAuthenticationTokenValue = token;
service.Credentials = CredentialCache.DefaultCredentials;
return token.CallerId.ToString();
}

==========================================================

Kindly reply for the same.


Viewing all articles
Browse latest Browse all 55831

Trending Articles