Skip to main content

What is Entity and how can create , Delete, Update it?

 An entity is used to model and manage business data in CRM. Contacts, Cases, Accounts, Leads, Opportunities, Activities, etc. are all entities which hold data records. Conceptually, a CRM entity is equivalent to a database table. For example, Contacts entity would hold Contact records, Cases entity would hold Cases records, and so on.

You can have both: out-of-the-box entities (which comes by default with the CRM) and custom entities (which you can create with customization). For instance, suppose that you are maintaining the data of the books your customers have read. For this, you will be storing the customer data using out-of-the-box Contacts entity but where would you store the books data? You do not have any entity that can store data for books. In such scenarios, you will create a new custom entity named Books and relate this with the existing Contacts entity.

For this tutorial, let us take an example of storing employers and employees in CRM. Taking this example into consideration, out-of-the-box, CRM provides Contact entity in which you can ideally store all your employees. It also provides an Account entity in which you can store all your employers. But for the sake of learning entities, we will create a new custom entity called Employer (and not use the existing Account entity).

Creating a New Entity

Step 1 − Click the top ribbon button followed by Settings option. Click Customizations option from the Customization section (Refer the following screenshot).

Mscrm Create Entity Step 1

Step 2 − Now click Customize the System option.

Mscrm Create Entity Step 2

This will open up the Default Solution window. You will learn more about CRM Solutions in the next chapters but for now you will be using the default CRM Solution.

Mscrm Create Entity Step 2_2

Step 3 − Expand the Entities option from the left panel.

Mscrm Create Entity Step 3

Step 4 − Now click New → Entity.

Mscrm Create Entity Step 4

Step 5 − In the Entity Form, enter the Display Name as Employer and PluralName as Employers. In the section ‘Areas that display this entity’, check Sales, Service and Marketing. Checking these options will display the newly created entity in Sales, Service, and Marketing tabs of CRM.

Mscrm Create Entity Step 5

Step 6 − Click on the Save and Close icon. This will create a new entity in CRM database behind the scenes.

Mscrm Create Entity Step 6

Step 7 − In the Default Solution parent window, you will see the newly created Employer entity.

Mscrm Create Entity Step 7

Step 8 − Click Publish All Customizations option from the top ribbon bar. This will publish (aka commit) all the changes we did till now. You can close this window by clicking Save and Close.

Mscrm Create Entity Step 8

Creating Records

CRM is all about managing valuable data in your system. In this section, we will learn how to create, open, read, and delete records in CRM. We will continue with the employer entity that we created in the last chapter.

Step 1 − Navigate to Employer entity records grid via Show work areas → Sales → Extensions → Employers.

Mscrm Access Entity Step 3

Step 2 − Click the New icon.

Mscrm Create Records Step 1

This will open the default new employer form. You can see that there is only one editable field Name in this default form. Enter Employer 1 in the Name field. Click Save and Close.

Mscrm Create Records Step 2

Step 3 − In the Active Employers view, you can see the newly created employer record.

Mscrm Create Records Step 3

Accessing Records

To access the already created records in CRM, go to that entity page. In our case, navigate to Show work areas → Sales → Extensions → Employers. You will see list of records present there in the grid. Click any Employer record to access it.

Mscrm Create records Step 3

Updating Records

Once you have a record open, you can just edit any details on the form. By default, CRM 2015 comes with auto-save option which saves any changes made to the form 30 seconds after the change. Alternatively, you can click Ctrl+S.

Mscrm Edit Records

In case you want to disable the auto-save feature, go to Settings → Administration → System Settings → Enable auto-save for all forms and select No.

Mscrm Disable Auto Save

Deleting Records

Step 1 − Select one or multiple records which you want to delete and click the Delete button.

Mscrm Delete Records.jpg

Step 2 − Confirm the deletion of records by clicking Delete.

Mscrm Delete Records Confirmation

Comments

Popular posts from this blog

Comparison: Using Workflows vs. JavaScript vs. Plugins in Dynamics CRM?

  There are three ways to automate actions in Microsoft Dynamics CRM: workflows, JavaScript, or plugins. In this blog we will discuss the difference between them and how to choose which option is appropriate for your task. Workflows  can perform tasks such as updating data or sending email. They are triggered by saving records, creating records, or changing specific fields on a form, and once triggered, they run on their own in the background. As you can see in the example of  How to Assign a Territory to a Lead in Dynamics CRM , you can even look up data in another entity. JavaScript  runs on the screen while the user is using a form. JavaScript is triggered by events within the page, updating a field or saving, and it is commonly used to hide or show different fields on the forms. You can also, for instance,  Populate a CRM 2011 Lookup or PartyList Field Using JavaScript  by having a lookup automatically linked to the record based on what is entered in an...

Task Activity Timeline

  1. Overview The PCF Calendar Control is a custom PowerApps component that displays activities in a calendar-like view. It supports multiple views (monthly, weekly, yearly, daily), allows users to expand/collapse records for each date, and provides a scrollable interface for better usability. The control is built using TypeScript and CSS, adhering to best practices for type safety and maintainability. 2. Features View Modes: Monthly View : Groups activities by month. Weekly View : Groups activities by week. Yearly View : Groups activities by year. Daily View : Displays activities for individual days. Expand/Collapse Functionality: Users can click on a date to expand or collapse its associated records. Smooth animations enhance the user experience. Scrollable Container: A scrollable container ensures that large datasets are manageable. Responsive Design: The control adjusts its layout for smaller screens. Type Safety: The code uses TypeScript interfaces to avoid the use of any and...

Trigger JavaScript on Click of Button PCF Control

  Overview The TriggerJavascript control is a custom PCF (PowerApps Component Framework) control that renders a button with customizable label, icon, and on-click script execution. The control allows users to dynamically trigger JavaScript code upon clicking the button. Dependencies IInputs, IOutputs from ./generated/ManifestTypes (Auto-generated types from PowerApps) CSS styling from ./CSS/TriggerJavascript.css Class: TriggerJavascript This class implements ComponentFramework.StandardControl<IInputs, IOutputs> and manages rendering a button inside a container, dynamically executing JavaScript code on button click. Properties Private Properties _container: HTMLDivElement - A reference to the container element where the button will be rendered. Methods constructor() Initializes a new instance of the TriggerJavascript control. init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container: HTMLD...