Delete Module (Soft)
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Removes a module from a page by sending it to the DNN Recycle Bin. The module and its content stay in the database, and an administrator can restore it from the Recycle Bin later.
note
This action is part of the Portal Management add-on, which is installed and licensed separately (feature package PORTAL). If it isn't licensed, the action fails with a not-licensed error.
Typical Use Cases
- Remove a module from a page when you might want it back
- Take down a campaign or announcement module at the end of a process
- Remove the old instance after placing a module on another page with Add Existing Module
Don't use it to
- Remove a module for good. Use Delete Module (Hard) instead.
- Hide a module for a while. Set an end date or change its view permissions with Update Module instead.
- Delete a whole page. Use Delete Page (Soft) instead.
Related Actions
| Action Name | Description |
|---|---|
| Delete Module (Hard) | Deletes a module instance permanently. |
| Load Module | Checks that the module exists before you delete it. |
| Update Module | Hides a module with dates or permissions instead of deleting it. |
| Add Module | Adds a new module to a page. |
| Export Module Content | Saves a module's content before you delete it. |
| Delete Page (Soft) | Sends a whole page to the Recycle Bin. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Page | The page that has the module. Pick a page, or use an expression that resolves to a Tab ID, a Tab Path such as //Customers//Acme, or a Tab Name (the first page with that name is used). Leave empty to use the current page. | Yes | Current page | No |
| Module Identifier | The module to delete, as a module ID or a module title. A title is matched without regard to case, and the first module on the page with that title is used. Modules already in the Recycle Bin are skipped. | Yes | empty string | Yes |
Output Parameters Reference
This action doesn't produce any output tokens.
Soft or hard delete
| Delete Module (Soft) | Delete Module (Hard) | |
|---|---|---|
| What happens | The module instance is marked as deleted on this page | The module instance is removed from this page |
| Recycle Bin | Yes, it can be restored | No, it can't be restored |
| Module and content | Kept in the database | Removed by DNN when this was the last page showing the module |
| Shared instances on other pages | Not affected | Not affected |
Considerations
- Only this page is affected. If the module is shared on other pages (see Add Existing Module), those instances stay.
- A missing module isn't an error. If the page or module can't be found, the action does nothing.
- Use the module ID when you can. Titles aren't unique, so a title can match a different module than you expect.
- Restoring isn't an action. Restore the module from the Recycle Bin in DNN. A soft-deleted module can't be found by the other module actions, including Delete Module (Hard), so you can't empty the Recycle Bin with actions.
- Guard against an empty identifier. An empty Module Identifier matches the first module on the page that has no title. Add a condition such as
[ModuleId] != "". - Tab IDs are used as given. A numeric Page value isn't checked against the current portal. Make sure the ID comes from a trusted source.
- Leaving Page empty needs a current page. In a scheduled workflow or an API call there's no current page, so the action fails with
Could not get current page. - There's no permission check in the action. Anyone who can run it can delete modules from any page. Only run it where trusted users can reach it.
Examples
tip
To understand how to use the below examples, please see Running Examples.
1. Remove a module when a campaign ends
This action sends the module in [CampaignModuleId] on the //Promotions page to the Recycle Bin when the CampaignStatus token is Ended.
{
"Title": "Delete Module (Soft)",
"ActionType": "SoftDeleteModule",
"Description": "Remove the campaign module",
"Condition": "[CampaignStatus] == \"Ended\"",
"Parameters": {
"PageId": "//Promotions",
"ModuleId": "[CampaignModuleId]"
}
}
Revised 09/27/2026