Home > CRM > CRM Optionset Enum generation tool

CRM Optionset Enum generation tool

I recently used CrmSvcUtilGenerateOptionSetEnums tool from CodePlex to generate Enum for my Optionsets.

This tool is helpful, if you have to refer Option set values in your Plug-ins or Custom code.

We just need to run the below command on Console to generate output file

CrmSvcUtil.exe /codecustomization:”GenerateOptionSetEnums.CodeCustomizationService, GenerateOptionSetEnums” /codewriterfilter:”GenerateOptionSetEnums.FilteringService, GenerateOptionSetEnums” /url:http://Server/Organization/XRMServices/2011/Organization.svc /out:Attributes.cs /basetypes:Microsoft.Xrm.Client.CrmEntity

Output file contain generated enum’s per entity as below

Output file

Output file

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: