OpenWGA 7.10 - TMLScript reference

HDBModel
Method :

deleteContent(hdbDeleteParams)
deleteContent([content])

On object HDBModel
Usage Deletes a HDBModel content document
Description

This method should be preferred for deleting HDBModel content instead of doc.remove(), as it ensures all HDBModel event scripts are run and special conditions tested.

Variant 1 is the full version taking all possible parameters for the delete operation from a HDBModelParams object.

Variant 2 is a convenience version taking just the content document to delete.

Parameters

Variant 1:

hdbDeleteParams (HDBModelParams):

All parameters for the delete operation. The refDocument is taken as document to delete.

Variant 2:

content (WGAPI object WGContent | TMLContext, optional):

The content document to delete. If not specified the content of the current context will be deleted.

Writable False
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples

Deleting the current context document. This obviously should be the last operation of an action as the current WebTML context will not be valid after that:

HDBModel.deleteContent(content());