|
1 |
| ---- |
2 |
| -title: Delete a custom entity | Microsoft Docs |
3 |
| -description: Step-by-step instructions for how to delete a custom entity and clear all data in Power Apps |
4 |
| -author: lancedMicrosoft |
5 |
| -manager: kfile |
6 |
| -ms.service: powerapps |
7 |
| -ms.component: cds |
8 |
| -ms.topic: conceptual |
9 |
| -ms.date: 03/21/2018 |
10 |
| -ms.author: lanced |
11 |
| -search.audienceType: |
12 |
| - - maker |
13 |
| -search.app: |
14 |
| - - PowerApps |
15 |
| - - D365CE |
16 |
| ---- |
17 |
| - |
18 |
| -# Delete a custom entity |
19 |
| -You can delete custom entities, but you can't delete standard entities. |
20 |
| - |
21 |
| -1. On [powerapps.com](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc), expand the **Data** section and click or tap **Entities** in the left navigation pane. |
22 |
| - |
23 |
| -  |
24 |
| - |
25 |
| -2. In the list of entities, click or tap the entity to delete, and then click or tap the **Delete entity** option from the command bar. |
26 |
| - |
27 |
| -3. In the dialog box that appears, click or tap **Delete** to delete the entity. |
28 |
| - |
29 |
| ->[!NOTE] |
30 |
| ->When you delete an entity, you delete both the entity definition and all data that the entity contains. Entities and the data within them cannot be recovered if deleted. |
31 |
| -
|
32 |
| ->[!NOTE] |
33 |
| ->You might break an app or flow if you delete an entity that is used in that app. |
34 |
| -
|
35 |
| ->[!NOTE] |
36 |
| ->If entity A has [lookup fields](data-platform-entity-lookup.md) to entity B, you might have to delete entity B before you can delete entity A. |
37 |
| -
|
| 1 | +--- |
| 2 | +title: Delete an entity | Microsoft Docs |
| 3 | +description: Step-by-step instructions for how to delete a custom entity and clear all data in Power Apps |
| 4 | +author: lancedMicrosoft |
| 5 | +manager: kvivek |
| 6 | +ms.service: powerapps |
| 7 | +ms.component: cds |
| 8 | +ms.topic: conceptual |
| 9 | +ms.date: 06/29/2020 |
| 10 | +ms.author: lanced |
| 11 | +ms.reviewer: matp |
| 12 | +search.audienceType: |
| 13 | + - maker |
| 14 | +search.app: |
| 15 | + - PowerApps |
| 16 | + - D365CE |
| 17 | +--- |
| 18 | + |
| 19 | +# Delete an entity |
| 20 | +You can delete custom entities, but you can't delete standard entities. Notice that you can't delete a custom entity while it has one or more dependent components. More information: [Delete an entity that has dependencies](#delete-an-entity-that-has-dependencies) |
| 21 | + |
| 22 | +> [!WARNING] |
| 23 | +> When you delete an entity, you delete both the entity definition and all data that the entity contains. Entities and the data within them can't be recovered if deleted. |
| 24 | +
|
| 25 | +## Delete a custom entity |
| 26 | +1. Sign into [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc), select **Solutions** in the left navigation pane, open the solution that contains the custom entity you want to delete, and then select it. |
| 27 | + |
| 28 | +  |
| 29 | + |
| 30 | +2. On the command bar select **Remove**, and then select from the following choices: |
| 31 | + - **Remove from this solution**. Removes the entity from the solution. You can still access the entity from the Default Solution. |
| 32 | + - **Delete from this environment**. Deletes the entity and associated data. |
| 33 | + |
| 34 | +3. In the dialog box that appears, select **Delete** to delete the entity. If you receive a message that the *component cannot be deleted because it is referenced by other components*, see the next section in this article. |
| 35 | + |
| 36 | +## Delete an entity that has dependencies |
| 37 | +You can’t delete an entity while it has a dependency on another component, such as a business process flow or a model-driven app. |
| 38 | + |
| 39 | +There are two ways that you can remove a dependency: |
| 40 | +- Reconfigure the component to remove the dependency. |
| 41 | +- Delete the component. |
| 42 | + |
| 43 | +### Remove a dependency |
| 44 | +To find the dependencies for a component, see [View dependencies for a component](view-component-dependencies.md). |
| 45 | + |
| 46 | +Next, remove the component. For example, if you have a business process flow that references an entity you want to delete, edit the business process flow to remove that entity. Once the business process flow no longer references that entity, the entity will no longer appear in the show dependencies list and can be deleted. More information: [Delete a custom entity](#delete-a-custom-entity) |
| 47 | + |
| 48 | +> [!IMPORTANT] |
| 49 | +> Removing the dependency, can cause the component to no longer work. For example, removing an entity from a model-driven app may cause the model-driven app to no longer work. |
| 50 | +
|
| 51 | +For more information, see these articles: |
| 52 | +- [Edit or remove artifacts](../model-driven-apps/add-edit-app-components.md#edit-or-remove-artifacts) |
| 53 | +- [Edit a business process flow](/power-automate/create-business-process-flow#edit-a-business-process-flow) |
| 54 | +- [Delete relationships](create-edit-1n-relationships-portal.md#delete-relationships) |
0 commit comments