CascadeDeleteNull - DataDictionary

Allows child DDs to specify if they should be deleted or have their child to parent relationship set to null

Type: Procedure Set

Data Type: Boolean

Parameters: Integer iParent Boolean bAllowed

ParameterDescription
iParentHandle of parent table
bAllowedSet True to be deleted and False to set the child to parent relationship to null


Syntax
Procedure Set CascadeDeleteNull Integer iParent Boolean bAllowed


Description

Child DDs can specify if they should be deleted or have their child to parent relationship set to null. This is controlled on a parent by parent basis by setting CascadeDeleteNull.

By default, this is False, so cascade deletes actually delete the record. If set to True and ParentNullAllowed has been set to True, then instead of deleting the record, it will change the child parent to a null record, adjusting all Backout and Update values as needed.

Note that ParentNullAllowed must be set True for this to even be tested. If parent null relationships are not allowed, it would not make sense to do this.

For example, in the Order Entry sample, OrderHea, null sales person relationships are allowed. Therefore, when deleting a SalesP record, it might make sense to switch the SalesP parent of all orders with that sales person parent to null.

// for OrderHea
Set ParentNullAllowed SalesP.File_Number to True
Set CascadeDeleteNull SalesP.File_Number to True