How to automatically generate early related Enum properties for Entity attributes, which are usually parameter sets?

Creating early related entities for CRM objects is quite simple. Creating Enums for OptionSets is pretty simple. Creating OptionSet Enum properties for objects that are entered into the correct Enum is not so simple and is not currently supported by CrmSrvUtil.exe. If you want to use enumerations to populate parameter values, you need to constantly write code that looks like this:

contact.Address1_AddressTypeCode = new OptionSetValue((int)contact_address1_addresstypecode.Home);

How can I create special Enum properties for OptionSetValues, so I can write code like this:

contact.Address1_AddressTypeCode = contact_address1_addresstypecode.Home;

and therefore Address1_AddressTypeCode'stype contact_address1_addresstypecode?

+5
source share
2 answers

... : - CRM Disclamer: .

+4

Entum OptionSet Enum Mapper . :

OptionSet

set/enum dll, .cs, , Enum.

+2

All Articles