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

Contacts View PCF Control

  1. Overview The ContactsControl component is a custom PowerApps control that displays a searchable and sortable table of contact records. It provides an interactive UI for filtering and selecting records. 2. Functionalities Search Feature: Allows users to filter records by entering text. Sorting: Clickable column headers enable ascending/descending sorting. Record Selection: Users can select a record to trigger a modal alert. Dynamic Rendering: Updates view dynamically based on search and sort input. Custom Styling: Uses external CSS for styling. 3. Component Structure Main Container ( HTMLDivElement ) : Holds the search bar and table. Search Input ( HTMLInputElement ) : Enables real-time search. Table ( HTMLTableElement ) : Displays the records with sortable headers. Modal Alert ( HTMLDivElement ) : Displays selected record details. 4. Implementation Details 4.1 Initialization ( init Method) Sets up the main container. Loads external styles. Creates...

Attachment PCF

Overview The AttachmentControl component is a PowerApps Component Framework (PCF) control designed for handling file uploads. It supports multiple file uploads, drag-and-drop functionality, file previews, and base64 encoding for easy data handling. Features Supports multiple file uploads Drag-and-drop functionality File type and size validation Base64 conversion for uploaded files Preview support for images, PDFs, and text files File removal functionality Code Breakdown Importing Dependencies import { IInputs, IOutputs } from "./generated/ManifestTypes"; The component imports IInputs and IOutputs from the generated manifest file to define the control's input and output types. Component Definition export class AttachmentControl implements ComponentFramework.StandardControl<IInputs, IOutputs> { Defines the AttachmentControl class, implementing the StandardControl interface from PCF. Class Variables private container: HTMLDivElement; private fileInput: HTMLInputEl...

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...