MS Dynamics CRM online 2011 - Authentication issues

后端 未结 1 1523
失恋的感觉
失恋的感觉 2020-11-27 08:13

I am a total newbie with dynamics crm online (2011), and although I have been working through the SDK sample code, I am trying to find the simplest way to perform a basic au

相关标签:
1条回答
  • 2020-11-27 08:28

    This is the simplest way to connect to CRM Online, you need only to add reference to Microsoft.Xrm.Sdk.Client and Microsoft.Xrm.Client.Services

    CrmConnection crmConnection = CrmConnection.Parse("Url=https://XXX.crm.dynamics.com; Username=user@domain.onmicrosoft.com; Password=passwordhere;");
    OrganizationService service = new OrganizationService(crmConnection);
    
    Entity account = new Entity("account");
    account ["name"] = "Test Account";
    
    Guid accountId = service.Create(account); 
    

    Refers to this msdn article for create the right connection string

    Simplified Connection to Microsoft Dynamics CRM

    0 讨论(0)
提交回复
热议问题