Archive

Posts Tagged ‘enum’

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