Create and edit entities using solution explorer
You can easily create an entity using the Power Apps portal for most common situations, but not all capabilities are implemented there. When you need to meet the requirements described in Create and edit entities in Common Data Service, you can achieve them by creating or editing entities using the Solution Explorer.
Open solution explorer
Part of the name of any entity you create is the customization prefix. This is set based on the solution publisher for the solution you’re working in. If you care about the customization prefix, make sure that you are working in an unmanaged solution where the customization prefix is the one you want for this entity. More information: Change the solution publisher prefix
Navigate to an unmanaged solution
From the Power Apps portal select Solutions, and then on the toolbar, select Switch to classic.
In the All Solutions list select the unmanaged solution you want.
In the solution explorer Components node, select the Entities node.
Create an Entity
While viewing entities, select New to open the new entity form.
The new entity form has two tabs. The General tab is for entity options. The Primary Field tab is for options about the special single line of text field that each entity has that defines the text shown when there is a link to open the entity in a lookup field.
For information about each section see the following:
You can also make the entity a custom activity. This choice changes some of the default option values. More information: Create a custom activity entity
After you have set the required options for the entity, click to create the custom entity.
Configure the primary field
In the Primary Field tab you can usually accept the default values for the primary field, but you have the following options:
|Display Name||Enter the localizable label that will be displayed for this field in forms and lists. The default value is Name.|
|Name||Set the name used in the system for this field. The default value is
|Maximum Length||Enter the maximum length for the field values. The default is 100.|
These options do not apply if the entity is an activity entity. More information: Create a custom activity entity
Configure required fields
In the General tab, some of the options are required before you can save the entity.
|Display Name||This is the singular name for the entity that will be shown in the app.
This can be changed later.
|Plural Name||This is the plural name for the entity that will be shown in the app.
This can be changed later.
|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. More information: Standard entity ownership|
Edit an entity
While viewing entities, select the entity you want to edit, or continue editing a new entity you have just saved.
Standard entities or custom entities that are part of a managed solution may have limitations on changes you can apply. If the option is not available or is disabled, you are not allowed to make the change.
Set once options
The following options can be set once and cannot be changed after you set them. Take care to only set these options when you need them.
|Activities||Associate activities to records for this entity.|
|Business process flows||Create business process flows for this entity. More information: Create a business process flow to standardize processes|
|Connections||Use the connections feature to show how records for this entity have connections to records of other entities that also have connections enabled.|
|Feedback||Let customers write feedback for any entity record, or rate entity records within a defined rating range. More information: Enable an entity for feedback/ratings|
|Notes||Append notes to records for this entity. Notes include the ability to add attachments.|
|Queues||Use the entity with queues. Queues improve routing and sharing of work by making records for this entity available in a central place that everyone can access.|
|Sending email||Send emails using an email address stored in one of the fields for this entity. If a Single Line of Text field with format set to email doesn’t already exist for this entity, a new one will be created when you enable sending email.|
Options that you can change
The following properties can be changed at any time.
|Access Teams||Create team templates for this entity.|
|Allow quick create||After you have created and published a Quick Create Form for this entity, people will have the option to create a new record using the Create button in the navigation pane. More information: Create and design forms
When this is enabled for a custom activity entity, the custom activity will be visible in the group of activity entities when people use the Create button in the navigation pane. However, because activities don’t support quick create forms, the main form will be used when the custom entity icon is clicked.
|Areas that display this entity||In the web application choose one of the available sitemap areas to display this entity. This does not apply to model-driven apps.|
|Auditing||When auditing is enabled for your organization, this allows for changes to entity records to be captured over time. When you enable auditing for an entity, auditing is also enabled on all its fields. You can select or clear fields that you want to enable auditing on.|
|Change Tracking||Enables data synchronization in a performant way by detecting what data has changed since the data was initially extracted or last synchronized.|
|Color||Set a color to be used for the entity in model-driven apps.|
|Description||Provide a meaningful description of the purpose of the entity.|
|Document management||After other tasks have been performed to enable document management for your organization, enabling this feature allows for this entity to participate in integration with SharePoint.|
|Duplicate Detection||If duplicate detection is enabled for your organization, enabling this allows you to create duplicate detection rules for this entity.|
|Enable for mobile||Make this entity available to the Dynamics 365 for phones and tablets apps. You also have the option to make this entity Read-only in mobile.
If the forms for an entity require an extension not supported in Dynamics 365 for phones and tablets apps use this setting to ensure that mobile app users can’t edit the data for these entities.
|Enable for phone express||Make this entity available to the Dynamics 365 for phones app.|
|Mail merge||People can use this entity with mail merge.|
|Offline capability for Dynamics 365 for Outlook||Whether data in this entity will be available while the Dynamics 365 for Outlook application is not connected to the network.|
|Primary Image||System entities that support images will already have an Image field. You can choose whether to display data in this field as the image for the record by setting this field to [None] or Default Image.
For custom entities you must first create an image field. Each entity can have only one image field. After you create one, you can change this setting to set the primary image. More information: Image fields
|Reading pane in Dynamics 365 for Outlook||Whether the entity will be visible in the reading pane for the Dynamics 365 for Outlook app.|
|Use custom Help||When enabled, set a Help URL to control what page users will see when they click the help button in the application. Use this to provide guidance specific to your company processes for the entity.|
You can also make the following changes:
- Create and edit fields for Common Data Service
- Create and edit relationships between entities
- Create and design forms
- Create a business process flow to standardize processes
Delete an entity
As someone with the system administrator security role, you can delete custom entities that aren’t part of a managed solution.
When you delete a custom entity, the database tables that store data for that entity are deleted and all data they contain is lost. Any associated records that have a parental relationship to the custom entity are also deleted. For more information about parental relationships, see Create and edit relationships between entities.
The only way to recover data from an entity that was deleted is to restore the database from a point before the entity was deleted. More information: Backup and restore instances
While viewing entities, click the command in the toolbar.
While viewing an entity use the delete command in the menu bar.
Deleting an entity that contains data will remove all the data. This data can only be retrieved by backup of the database.
If there are any entity dependencies you will get a Cannot Delete Component error with a Details link you can use to discover information about why the entity cannot be deleted. In most cases, this will be because of a dependency that has to be removed.
There may be more than one dependency blocking the deletion of an entity. This error message may only show the first one. For an alternate way to discover dependencies, see Identify entity dependencies
Identify entity dependencies
You can identify dependencies that will prevent an entity from being deleted before you try to delete it.
- In the solution explorer with the entity selected, click Show Dependencies in the command bar.
- In the dialog window that opens, scroll the list to the right to view the Dependency Type column.
Published dependencies will block deleting an entity. Internal dependencies should be resolved by the system.
- Remove these published dependencies and you should be able to delete the entity.
A very common dependency is that another entity form has a lookup field for the entity you are deleting. Removing the lookup field from the form will resolve the dependency.
Create custom activity entity
To create the entity as an activity entity, use the same steps described in this topic except select Define as an activity entity.
An activity entity is a special kind of entity that tracks actions for which an entry can be made on a calendar. More information: Activity entities.
When you set this option some entity properties are not compatible. An activity entity has to conform to standard behaviors that all activity entities use.
The primary field Name and Display Name will be set to Subject and you cannot change this.
The following options are set by default and cannot be changed:
- Notes (includes attachments)
- Offline capability for Dynamics 365 for Outlook
The following options cannot be set:
- Areas that display this entity
- Sending email
- Mail Merge
- Single record auditing
- Multiple record auditing
Create a Virtual Entity
Some options are only used when creating a virtual entity.
|Virtual Entity||Whether the entity is a virtual entity.|
|Data Source||The data source for the entity.|