Κοινή χρήση μέσω


Create and edit global option sets

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

An option set is a type of field that can be included in an entity. It defines a set of options. When an option set is displayed in a form it uses a drop-down list control. When displayed in Advanced Find it uses a picklist control. Sometimes option sets are called picklists by developers.

You can define an option set to use a set of options defined within itself (locally) or it can use a set of options defined elsewhere (globally) which can be used by other option set fields. Global option sets are useful when you have a standard set of categories that can apply to more than one entity. Maintaining two separate option sets with the same values is difficult and if they are not synchronized you can see errors, especially if you are mapping entity fields in a one-to-many entity relationship. More information:  Map entity fields

In This Topic

Configure global option sets

Use a global option set

Configure global option sets

Create a global option set

  1. Go to Settings > Customizations.

  2. Choose Customize the System.

  3. In the solution explorer, choose Option Sets.

  4. On the actions toolbar choose New.

  5. Enter a Display Name and (optionally) a Description.

    The Name field value will be generated based on the value of the Display Name you enter.

    The Name field value will include the customization prefix for the solution publisher for the solution you are working in. If the customization prefix is important to you, make sure you are working in the context of a solution that has the customization prefix you want for this global option set. See Solution publisher for information about how to change the customization prefix.

    The Name field value must be unique. If the generated value is the same as an existing global option set, you will need to change it before you can save.

  6. Unlike the Description for fields, the Description value for a global option set is not displayed as a tooltip when the field is used in a form. This description is only visible in the list of global options. You can use the description to provide information about why you have created this global option set and what it should be used for.

  7. In the toolbar choose Save to save the global option set. You can then edit the options in the option set using the instructions below.

Edit a global option set

  1. Go to Settings > Customizations.

  2. Choose Customize the System.

  3. In the solution explorer, choose Option Sets.

  4. Double-click one of the existing option sets to open it.

  5. You can edit the Display Name or Description fields, but editing the options is the most common reason to edit a global option set.

    Edit option set options

    1. In the Options section you can create, edit, delete and change the order in which options are presented.

      Create new options
      1. Choose the green + icon to create an option.

      2. Each option you create will have a Label value of Item and a Value that starts with 10,000 and increments for each option you add.

        Edit the Label to be the text you want to display.

        You can edit the Value, but we recommend that you accept the auto-generated value. The value must be unique within the options.

        The Description for each option is not visible to people using the application. Use it to provide some definition of the category it represents so that others editing this option set in the future can understand your intention in adding it.

      Edit existing options
      1. To edit an option that already exists you may change the Label, Value and Description values just as you would when creating a new option.
      Delete an option
      1. To delete an option you select one and choose the delete icon.

      Important

      If you delete an option that has already been used in entity records, the data value in those records will be invalid. If you are not sure, use Advanced Find to see if there are any records set to the value you are about to delete. If they are set to the option you plan to delete, you should change the data before you delete the option. After you delete the option you will no longer be able to use Advanced Find to query records that have that option set.

      Change the order used by options
      1. Use the green arrows in options toolbar to move selected options up or down.

        Use the ascending or descending sort buttons to sort all options in the respective direction according to their label values.

Use a global option set

To use a global option set, you create or edit a field in the field editor.

  1. Go to Settings > Customizations.

  2. Choose Customize the System.

  3. In the solution explorer, select an entity and then choose Fields.

  4. Select the field you want to edit or select New to create a new field.

  5. In the field editor, select Yes for Use Existing Option Set.

    If you are creating a new field you need to first select Option Set for the Data Type.

  6. Make a selection in the Option Set drop-down menu.

  7. When you have completed your entries, select Save and Close.

Note

You can also get to the field editor through Forms. Select an entity and then choose Forms. Select a field and then choose Change Properties. In the dialog box select the Details tab and then choose Edit.

In addition to the option sets you see in the solution explorer, there are also a number of system global option sets. You can use these if they happen to meet your need but they aren’t customizable.

Note

The system global option set options may change with updates or new versions so we recommend you don’t use them unless you are certain that your requirements align with the way that the application uses these values.

In addition to selecting the global option set, you can also choose which of the options (if any) should be the Default Value for that field.

See Also

Create and edit metadata
Create and edit entities
Create and edit fields
Create and edit entity relationships

© 2016 Microsoft. All rights reserved. Copyright