Skip to main content
Version: 1.28 (Current)

Delete Module (Soft)

Audience: Low-code Engineers

Skill 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​

Action NameDescription
Delete Module (Hard)Deletes a module instance permanently.
Load ModuleChecks that the module exists before you delete it.
Update ModuleHides a module with dates or permissions instead of deleting it.
Add ModuleAdds a new module to a page.
Export Module ContentSaves a module's content before you delete it.
Delete Page (Soft)Sends a whole page to the Recycle Bin.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
PageThe 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.YesCurrent pageNo
Module IdentifierThe 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.Yesempty stringYes

Output Parameters Reference​

This action doesn't produce any output tokens.

Soft or hard delete​

Delete Module (Soft)Delete Module (Hard)
What happensThe module instance is marked as deleted on this pageThe module instance is removed from this page
Recycle BinYes, it can be restoredNo, it can't be restored
Module and contentKept in the databaseRemoved by DNN when this was the last page showing the module
Shared instances on other pagesNot affectedNot 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