How to create a Global Option Set Dynamics 365 - Customization

Learn how to create a global option set that can be used across multiple entities.

What you will learn

Navigate to a solution

Create an Option Set

Set Option Set Values

Create a local option using a global option set

Add the local option set to a form

Save and Publish changes to a form


Step 1 - Navigate to your customizations solution

Click here to learn how to create a solution and publisher for you customizations, see Step 4 (Highly Recommended).

  • On your site map, select the Settings Area, and click Solutions.

  • Open up your solution, I am using my testing solution shown below.

Step 2 - Navigate to Option Sets and Create New

  • On the left hand side of the solution window, click on Option Sets below Entities.

  • Click on the New button to create a new option set

Step 3 - Create your Global Option Set

  • Give the Option Set a name. I am going to use Contact Type. You will see why below.

Note: Leave the logical name as it is on the right. This logical name will be all lower case once you save it. My prefix is ca_ because I created my own publisher. Post coming soon!

  • Give the Option Set a Description based on its intended purpose.

  • Click on the green plus button to create your first option in your option set. I work in real estate so I am going to create an option set to categorize my contacts into different groups based on what they do, Broker, Buyer, Seller, Attorney, Engineer, Contractor, and Landscaper.

  • Notice the value below the label for each option. This is very important for writing plugins, custom workflows, and form scripts. These values are created by the system by default, but you can change them. I do not suggest changing them after you start using this option set or you will mess up existing data.

  • Click Save and Close

You have created your first Global Option Set!


Create a local option set with this global option set and add it to a form

Step 1 - Navigate to the Entity where you will use this option set.

  • Click on the drop down to the left of Entities on your solution.

  • Scroll down to the associate entity

  • Click on the drop down to the left of the entity. I am using the contact entity.

Step 2 - Open the form where the option set will be used.

  • Click on Forms, and then select the form where you will use it. I am using the Main Contact Form.

  • When the Form Editor opens, click New Field in the bottom right corner.

The field creation window will appear. See the image below.

Step 3 - Create a local option using the global option set.

  • Fill out the Display Name with the same value as the global option set, Contact Type.

  • Leave the Logical Name as it is. It will make this lower case when you save.

  • On the right, you can control if the field is Required, Recommended, or Optional.

  • Type a description for the field based on its purpose, this will double as a tool tip.

  • Change the Data Type to Option Set, or Multi-Select Option set if you want to give the user the ability to put a person into multiple categories instead of just one.

  • Leave the field type as simple (posts coming soon for calculated).

  • Change Use Existing Option Set to Yes

  • From the Option Set drop down, choose the Global Option Set we created earlier.

  • Set a default value if you would like. I am choosing not to.

  • Click Save and Close.

Step 4 - Add the field to the form

  • Refresh the Form Editor.

  • Scroll down the field list on the right hand side of the Form Editor window to the field you just created.

  • Drag this field on to the form where you would like it to display. I am placing it below Job Title. You will see a red line appear when you drag the field across the form, that will show you where the field will appear once you drop it.

Step 5 - Save and Publish

  • Click Save in the top left corner.

  • Once it has completed saving or after a few seconds, Click Publish.

  • You have created a Global Option Set and used it on a form! Go to the form and start using your new Global Option Set.

  • Because this is a global option set, it is available to use on other entities as well without having to recreate each one of the options or their values.

  • This is also very effective if you needed to edit the option set across multiple entities. You would only need to edit the global option set, the local option sets will update when the global option set changes are published.


0 comments