locked
CRM SDK 2016 and Azure Web Jobs RRS feed

  • Question

  • I download the CRM SDK 2016 and noticed there is no more Microsoft.Xrm.Client dlls. Do we know why??

    So I am using the following URL as a guide to create connection to CRM. https://msdn.microsoft.com/en-us/library/jj602970.aspx

    private IOrganizationService orgService;
    

    CrmServiceClient conn = newCrmServiceClient(CRMConnectionString); orgService = conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : conn.OrganizationServiceProxy;

    and then trying to create an account works just fine when running locally on Visual Studio but fails when deployed as a Azure web job with the following message

     Object reference not set to an instance of an object.

    Looks like it failing on orgService.Create(oEntity); where orgService is null when deployed on Azure but as I said works fine when running it locally as console application.

    Entity oEntity = new Entity("account");
    oEntity["name"] = "Created from Web Jobs" + DateTime.UtcNow.ToString();
    orgService.Create(oEntity);
    

    Thursday, February 18, 2016 9:02 PM

All replies

  • when I step through the conn variable I am seeing "Unable to Login to Dynamics CRMOrganizationServiceProxy is nullOrganizationWebProxyClient is nullOrganizationWebProxyClient is nullOrganizationServiceProxy is nullOrganizationWebProxyClient is null"

    I am puzzled it works just fine when running locally.

    Thursday, February 18, 2016 9:07 PM
  • the Xrm.Client is not anymore inside the 2016 SDK because they are moving to the Xrm.Tooling framework namespace and methods

    But you can still use the Xrm.Client dll from the CRM 2015 SDK


    My blog: www.crmanswers.net - CRM Theme Generator

    Friday, February 19, 2016 4:19 AM
  • Do we know why Microsoft is moving things around. This means we cannot use CRM SDK 2016 dlls for any new work without a lot of re working on the past project.
    Friday, February 19, 2016 1:17 PM
  • Facing the same issue. Do you know what the error was?
    Thursday, April 21, 2016 6:36 AM
  • Hi,

    i'm facing the similar issue. have u found any solution and what is the root cause?

    Thanks

    Monday, February 27, 2017 8:48 AM