Entities in Dynamics

Author by Ajay Ravi

In my previous blog I showed how to create a solution in dynamics 365. So, the next step after creating a solution is to create or use an existing entity and customize it as per the business needs. Customizing entities includes adding fields, changing the forms, creating custom entities etc. In this blog, we will see how to create a new entity and to modify an existing entity.

Overview: Entities

From a customization perspective, there are three types of entities- system entity, custom entity and activity entity. Let’s dive little bit in detail about the system entities. System entities are things like account entity, contact entity, opportunities, business units etc. A lot of these entities have functionalities around them which can be modified. But one thing to remember about these system entities is that it cannot be deleted. The custom entity is another type of entity which the use can create depending on the requirement. Custom entities, once they've been created in the system, those have full modification capabilities.  You can modify custom entities; you can delete custom entities.  Finally we have another type of entities are called activity entities.  They are basically things like appointments, tasks, phone calls that you would be oftentimes associating with records inside CRM.  Most of the time activity entities are just an attached option. Now, the nice thing is the out-of-the-box activity entities are there, and you can work with them as much as you need to. There are certain required fields which the user must fill before creating an entity. They are as below:

  • Display name: This is the singular name for the entity that will be shown in the app.
  • Plural name: This is the plural name for the entity that will be shown in the app.
  • Name: This field is pre-populated based on the display name you enter. It includes the solution publisher customization prefix.
  • Ownership: You can choose either user or team-owned or organization owned.

Creating a Custom Entity

We can create a new custom entity from scratch and customize it accordingly. Below are the steps that must be followed in-order to create a custom entity.

  1. On the navigation pane, click on the Settingà Customizations and then create a new solution.
  2. Open the created solution, click on entities under components, and click New.

Pic-3.PNG

Pic-2.PNG

  1. Fill in the Display Name, the Plural Name (the name that shows in the navigation pane), and indicate whether the entity will be owned by a user or team/organization (ownership).
  2. If the entity is an Activity entity, check the box Define as an Activity entity.
  3. In the Areas that display this entity, you can select the tabs within which this entity will be listed.
  4. Select the required options for the entity and save it.

After creating an entity, we can create the fields which the user wishes to display in the form as per the business requirements. Also, we can customize various features such as forms, view, charts, create relationships with other entities, business rule etc.

Modify an existing entity

Another option is to modify an existing entity. If the user wishes to use the existing entity from the system and then make changes to those, that can also be performed.

  1. On the navigation pane, click on the Settingà Customizations and then create a new solution.
  2. Open the created solution, click on entities under components, and click Add Existing.
  3. Select the entity which you wish to add to the solutions. Here we don’t have to provide name, ownership etc. since those details has already been provided before while creating that entity.

Once you add entities to the solution, we can use the forms, view and other features which were already created for that entity and start customizing. Or else we can create a new from scratch.

Conclusion

Creating a custom entity inside Dynamics 365 is really one of the most basic and common customizations that a user make inside the application.  By creating them, the user has the ability to start customizing the application as per your needs and meet specific requirements that you might have that are not met through the out-of-the-box functionality.  Each item that you're working with has specific properties that can be modified based upon individual situations. We can create custom entities and define specific properties based on the items. So, entity is an important functionality in Dynamics 365 using which we can modify the system in whichever way we want.