Dynamics CRM Entities
Dynamics CRM Entities is used to model and manage business data. Contacts, Cases, Accounts, Leads, Opportunities, Activities, etc. are all entities which hold data records. Conceptually, the Customer Relationship Management entity is equivalent to a database table. For example, the Contacts entity would hold the Contact records, Cases entity would hold Cases records, and so on.
You can have both Dynamics CRM Entities like out-of-the-box entities and custom entities (which you can create with customization). For instance, suppose that you are maintaining the information about the books your customers have read. For this, you will be storing the customer information using out-of-the-box Contacts entity but where would you store the books data? You do not have any entity that can store information for the books. In such scenarios, you will make the new custom entity named Books and relate this with the existing Contacts entity.
For this Article, let us take an example of storing employers and employees in CRM. Taking this example into consideration, out-of-the-box, Microsoft Dynamics CRM provides a Contact entity in which you can ideally store all your employees. It also offers the Account entity in which you can store all your employers. But for the sake of learning entities, we will make the new custom entity called Employer.
Creating a New Entity
Step 1 – Click to the top ribbon button followed by the Settings option. Click Customizations option from the Customization section (Refer the following screenshot).
Step 2 – Now click to the Customize the System option.
This will open up the Default Solution window.
Step 3 – Expand the Dynamics CRM Entities option from the left panel.
Step 4 – Now click the New → Entity.
Step 5 – In the Entity Form, enter the show Name as the Employer and Plural Name as Employers. In the section, the Areas that show this entity, check Sales, Service, and Marketing. Checking these options will show the newly created entity in Sales, Service, and Marketing tabs of the CRM.
Step 6 – Click to the Save and Close icon. This will make the new entity in the CRM database behind the scenes.
Step 7 – In the Default Solution parent window, you will view the newly made Employer entity.
Step 8 – Click Publish All Customizations option from the top ribbon bar. You can close this window by clicking to the Save and Close.
Creating Dynamics CRM Records
CRM is all about managing the valuable information in your system. In this section, we will learn how to make, open, read, and delete records in the CRM. We will continue with an employer entity that we made in the last chapter.
Step 1 – Navigate to the Employer entity records grid via display work areas → Sales → Extensions → Employers.
Step 2 – Click the New icon.
This will open the default new employer form. You can view that there is only 1 editable field Name in this default form. Enter Employer 1 in the Name field. Click Save and Close.
Step 3 – In the Active Employers see, you can view the newly created employer record.
To access the already created records in the CRM, for that go to that entity page. In our case, navigate to display the work areas → Sales → Extensions → Employers. You will see the list of records present there in the grid. Click any Employer record to access it.
Once you have the record open, you can just edit any details on the form. By default, CRM comes with the auto-save option which saves any changes made to the form 30 seconds after the change. Alternatively, you can click Ctrl+S.
In case you want to disable the auto-save feature, go to the Settings → Administration → System Settings → Enable auto-save for all forms and choose No.
Step 1 – Choose one or multiple records which you wish to delete and click to the Delete button.
Step 2 – Confirm the deletion of the records by clicking to the Delete.
As viewed in the above example, the default Employer form had only 1 field. However, in real life scenarios, you will have more custom fields on the form. For example, if you look at the sample Contact record, it will have many fields to store contact information such as Full Name, Email, Phone, Address, Cases, etc.
Many Custom Fields