Instead of manually creating dozens of new fields, you can use the Import Wizard in CRM 2011 to save some time. By having a simply source file that contains these fields, you can technically create new fields programmatically.
For this post, we'll create a new Option Set, Decimal and a Two Option field on the Account record.
Here are the steps:
1. Create an Excel file with the fields you need created:
2. For an Option Set, add the desired available options in a separate row as shown in the image below.
3. If there are any required fields on the Account form, I'll have to add those fields as well. In this example, the Account Name field is the only required in CRM.
4. Save the file as a .csv file.
5. Launch the Import Data Wizard from the ribbon in CRM.
6. Select your .csv file.
7. Select the appropriate entity (in this case, Account).
8. Map the Account Name Field from the source to the target field in CRM.
9. For the new fields, select Create New Field, then select the appropriate Data Type.
Note: The wizard will not allow you to create all data types. Global Option Sets, Currency and Multiple Lines of Text are not an option. To create fields with these data types, you'll need to do it the old-fashioned way.
10. For a Two Option field or Option Set field, the new Values will be created automatically.
11. Once all of the fields are mapped, simply complete the wizard and voila! Your new fields have been created. You will still need to add them to the form as desired.
As always, if you need additional assistance with Dynamics CRM, don't hesitate to reach out to PowerObjects.