Customer

This field is used to store customer details. A customer can be either an account or a contact, so this is used for a lookup field where we can set up a relationship between the current entity and an account or contact entity.

In addition to the preceding data types, there are some special data types that are not available for setting up custom fields—for example, Unique Identifier, Status, and Status Reason. These data types are used by Dynamics 365 CE only to set up fields during entity creation. Now that we know all of the possible data types, let's understand field editor options. While creating a new custom field, we can configure the following options:

  • Display Name: This label is used for the field on the entity form and views.
  • Name: Dynamics 365 CE uses this option to set up a column name for this field, and we can use this name to refer to the field while working with the SDK.
  • Field Requirement: We can use this option to set up field requirements, such as making them optional fields, which means users can leave this field blank. We could also choose Business Recommended, which means filling in this field is recommended, but the user can leave this field blank if they want to. Business Required means that users have to enter a value for this field in order to save the entity record. It won't allow users to leave this field blank.
  • Searchable: This option allows us to configure whether this field will show under Advanced Find or not. If it is set to No, we can't search the entity record using this field.
  • Field Security: We can use this option to apply field-level security to this field. Field-level security allows us to restrict field values based on the field-level security profiles. We will discuss field-level security further in a later section.
  • Auditing: Auditing allows us to capture changes in this field for later use. For example, if we want to monitor changes in this field value, we can enable auditing for this field. Keep in mind that enabling this option unnecessarily for the field can increase a Dynamics 365 CE database's size.
  • Description: We can use this option to provide details about this field. We can also use this field to show tooltips for users. Any information provided here will be displayed to the user when the user hovers their mouse on the label of this field (after publishing changes).
  • Appears in global filter and Sortable in interactive experience: These options enable this field to be used in interactive experience dashboards for customer service.
  • Data Type: We can select available data types that we discussed in an earlier section.
  • Field Type: We can select the field type based on the data type selected for this field. We will discuss possible field types in the next section.
  • Format: Some data types have format options available. We can select these based on our requirements.
  • Range Options: Some data types allow us to set up minimum and maximum range values that will restrict users to entering values within that range only.
  • IME Mode: This option defines the editor mode for this field. This option is used to deal with the special characters used in the Chinese, Japanese, or Korean languages. When set to Auto, the editor mode is automatically selected by Dynamics 365 CE.

Now we have learned the various field editor options, let's create the following field for our Vehicle entity. Navigate to Fields and click on the Add field button command bar to create a new field. Let's add an image field for our Vehicle entity so that we can show a vehicle image of the record. Fill in the following options in the field editor:

  • Display name: Vehicle Image
  • Data type: Image

Keep all other options set as their defaults. You can see the preceding steps in the following screenshot:

Click on the Done button to save the image field, and click on the Save Entity notification on the screen to save your changes for the entity. As soon as we create an image field, this field is automatically set under the Primary image field. We can click on the Add field button again to open the editor and create a new field option set to store the vehicle type. Fill in the following details for the Vehicle Type field:

  • Display name: Vehicle Type
  • Requirement: Yes
  • Searchable: Yes
  • Data type: Option Set
  • Option set: +New Option set
  • Add the following items:
  • Coupe
  • Crossover
  • Hatchback
  • MPV
  • Sedan
  • SUV

We can add options using an option set editor. Click on Add new item and enter labels one by one, as shown in the following screenshot:

Click on Done to create the field.

In the Vehicle entity, we have a number of lookup fields, so let's see how we can set up a lookup field in the Vehicle entity. Before setting one up, we must make sure we have created a parent entity whose lookup we want to create in the Vehicle entity, like so:

  • Click on Add field under field list
  • Write Customer in Display name
  • Select Lookup from Data type
  • Select Customer under Related entity (the entity whose lookup we want to create)

Click on Done. Similarly, we can set up other lookup fields for the Make, Model, and Year entities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.204.102