--- title: "Delete and Clear Entity" slug: "delete-and-clear-entity" tags: ["delete", "entity", "clear", "database"] updated: 2022-12-28T18:43:18Z published: 2022-12-28T18:43:18Z canonical: "documentation.decisions.com/delete-and-clear-entity" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Delete and Clear Entity | ## Step Details | | --- | | **Introduced in Version** | 4.0.0 | | **Last Modified in Version** | 5.0.0 | | **Location** | Database | The **Delete and Clear Entity** step deletes the Entity and clears any associated tables using its data. --- ## Properties #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Entity ID | The Id of the entity to delete. | String | #### ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1672251992731.png) --- ## Common Errors ### entity Id cannot be null If the entity Id is not correctly mapped, an error will occur. To correct this, ensure that the mapping for the entity Id is configured. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Delete And Clear Entity 1[DeleteAndClearEntity] in flow [Flow 1]: Exception invoking method DeleteAndClearEntity on class EntitySteps ---> DecisionsFramework.LoggedException: Exception invoking method DeleteAndClearEntity on class EntitySteps ---> DecisionsFramework.LoggedException: entity Id cannot be null at DecisionsFramework.ServiceLayer.Services.Folder.FolderService.GetEntityByID(AbstractUserContext userContext, String entityID at DecisionsFramework.Design.Flow.CoreSteps.DataBase.EntitySteps.GetEntityById(String entityId at DecisionsFramework.Design.Flow.CoreSteps.DataBase.EntitySteps.DeleteAndClearEntity(String entityId) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` --- ## Related - [Unhide Entity](/unhide-entity.md) - [Move Entity](/move-entity.md) - [Set Entity State](/set-entity-state.md) - [Hide Entity](/hide-entity.md) - [Save Entities](/save-entities.md) - [Rename Entity](/rename-entity.md) - [Set Entity Description](/set-entity-description.md)