Setting up a primary field

While creating an entity, we can set up the primary field of the entity. This field holds the record name for our entity, and this field is used for lookup fields in another entity. For example, let's say we have an account lookup in our custom entity. When we click on this lookup field, we see the account name under the lookup and are able to select a particular account record. We can click on the Primary Field tab to set up a primary field. We have the following properties available under this tab:

  • The Display Name option is used to provide a display name for our primary field. By default, this is set to Name, but we can change it. As an example, let's imagine we want to call it Vehicle name.
  • Name is used to refer SDK.
  • The Field Requirement option is used to set up field requirements for the Name field. We have three options here:
  • Business Required: If this option is set for the user for the field, the user has to fill in the Name field. This will add a red star to the field.
  • If the Business Recommended option is selected, it will add a blue plus (+) sign to the field, which means it is recommended to enter this value.
  • Optional: The user can skip entering a value for this field.

We should set these options based on our requirements. It is recommended that we keep the primary field as required because this field is used for the lookup field. So, if the user left this field blank, we wouldn't be able to see any value under this entity lookup field.

  • Data Type is fixed to Single Line of Text.
  • Format is fixed to Text.
  • Maximum Length: A Single Line of Text field can contain a maximum of 4,000 text characters.

Now that we have an understanding of entity properties and primary fields, let's create a vehicle entity in our solution. We can create a new entity using the numbered steps shown in the following screenshot:

Keep all other settings as their defaults, as follows:

Display name Vehicle
Plural display name Vehicles
Primary Field
Display name Vehicle Name

 

After entering these details, click on Create. Once the entity is created, we need to add attributes to this entity, so let's discuss entity attributes and their data types.

We can change the display name of the existing entities based on our requirements—for example, if we need to rename the opportunity entity to Auto Service.
..................Content has been hidden....................

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