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!!!!