Share via


Generating early bound class using crmsvcutil in Microsoft Dynamics CRM 2011 online live ID associated.

Trying to generate an early bound class in CRM 2011 online?? If yes is the answer this post will definitely help you out in meeting the requirement.

1) Before generating an early bound class you will have to make sure that the device is registered to connect to online CRM.

2) To make your device registered to connect to online CRM. You can just navigate to the Device Registration folder which is present in the tools folder of the SDK. In the Device registration folder just navigate to the bin/debug folder where you can find the deviceregistration.exe. Make sure you copy the path of the device registration application.

3) Now open the command prompt and paste the path to navigate to the location where DeviceRegistration.exe is present.

4) To register the device write the following command in the command prompt.

deviceregistration.exe /operation:Register

5) This will display the Device ID and Device Password which will be helpful for you to generate an early bound class in CRM online.

Note: If the device is already registered the application will throw an error saying the device is already registered.

6) After registering your device you can go ahead and generate an early bound class. To generate an early bound class you just have to navigate to the bin folder in the sdk. In the bin folder you have the crmsvcutil.exe file which will help you in generating the early bound class.

7) Now navigate to the crmsvcutil.exe folder location in the command prompt. In this location you can write the following code to generate the early bound class.

CrmSvcUtil.exe /url:https://dev.crm.dynamics.com/XRMServices/2011/Organization.svc /out: C:\GeneratedCode.cs /username:USERNAME /password: "********" / deviceid:”11mqqaku9s6usrnh52gn4fm75o” /devicepasswordXZo!O35,JF^/`n#tKO^iwj/B”)

8) In the above command url will be the url of the Organization.svc available in your developer resources in CRM. out will be the name of the output file name which is going to be generated. username and password will be the credentials which you will connect with CRM. DeviceId and DevicePassword will be the one which you have generated in our earlier step.

9) After running this command you will be able to see the code being generated.

Cheers!!!!

Comments

  • Anonymous
    January 01, 2003
    Hi Paul,

    I need more details about the instance like is it an on premise version or online with office 365? That would help me out to figure out the solution.

    Regards,

    Vishnu
  • Anonymous
    January 01, 2003
    Hi All,

    This is an old post for Microsoft Dynamics CRM 2011 online which is associated with Live Id. For the new one with Office 365 I am yet to write a blog post.
  • Anonymous
    June 02, 2014
    i tried this:
    C:UsersDesktopSDKBin>CrmSvcUtil.exe /url:https://.crm.dynamics.com/XRMServices/2011/Organization.svc /out:CrmModel.cs /username:@.onmicrosoft.com /password:**** /deviceid:11cgt7hfqjiefufq8oggqmbjf9 /devicepassword:K0lXY)8cko+vr(CkYbo%--!*
    CrmSvcUtil : CRM Service Utility [Version 6.1.0000.0581]
    c 2014 Microsoft Corporation. All rights reserved.

    But the error tells me that username is not provided.Specify username in ClientCredentials.

    Your help will be appreciated. Thanks.

  • Anonymous
    June 18, 2014
    I am also getting same error even after using your solution. Mine is Online with Office 365.

    CrmSvcUtil.exe /url:https://.crm.dynamics.com/XRMServices/2011/Organization.svc /out:C:xrm.cs /username:.onmicrosoft.com /password:*****123 /deviceid:"110mq46ivqt" /devicepassword:"-SO>u"
  • Anonymous
    September 06, 2016
    What do you mean by a "device"? I am trying to create a web site to connect to CRM online with Office 365 too. I am not using a "device". The way to do this seems very cryptic. Why do we need to use this CrmSrvUtil.exe? It does not work. I only get errors. How do I know what is the url of the organization.svc file?
    • Anonymous
      September 13, 2016
      The comment has been removed