Skip to content

CommitDeletes

Deletes all child nodes that have the State attribute set to the value 'Deleted'.

1
myXml.CommitDeletes():void

Remarks

Container form controls, by default, set the State attribute to 'Deleted' instead of directly deleting nodes. After the required actions have been performed, these marked nodes should be deleted if they are no longer needed. This method internally uses the XPath query .//*[@*[local-name()='State']='Deleted'] to find deleted descendant nodes of the current node.

Examples

Remove rows deleted in the form before saving them

1
2
// a typical task post-work script
$Xml.CommitDeletes();

Remove deleted rows only under a specific node

1
$Xml.SelectSingle('Lines').CommitDeletes();