Chirag
Chirag

Reputation: 334

Create Early Bound Entity Classes

I want to create an object of account entity. below is the sample code, which i need to achieve.

Account earlyAccount = new Account();
earlyAccount.Name = "Early Bound Account";
Guid earlyAccountId = service.Create(earlyAccount);

To use "Account" as entity, what i need to do ? Do i need to import any other namespace?

Upvotes: 0

Views: 471

Answers (2)

Sushant Salunkhe
Sushant Salunkhe

Reputation: 114

Use this command in MS-DOS/Developer Command Prompt for VS20xx

CrmSvcUtil.exe /url:http://serverName/organizationName/XRMServices/2011/Organization.svc    /out:outputFilename.cs /username:username> /password:password /domain:domainName

Upvotes: 1

Guido Preite
Guido Preite

Reputation: 15128

In order to generate Early Bound classes you need to use the CrmSvcUtil.exe included inside the CRM SDK.

However I strongly suggest to use the Early Bound Generator available inside the XrmToolBox, it has several options to generate the classes and you don't need to deal with the command line.

Upvotes: 3

Related Questions