Description
Child DDs (DataDictionaries) can now specify if they will allow their records to be deleted as part of a cascade delete.
The child DD specifies this on a parent table by parent table basis. If any child table disallows cascade delete anywhere within the cascade delete chain, the delete will be cancelled and rolled back. This is controlled by setting CascadeDeleteAllowed.
Set CascadeDeleteAllowed hParentTable to True|False
By default, a DDO (DataDictionary Object) allows a cascade delete from any parent, so the default (for all parents) is True. If you wish to stop cascade deletes, set this property to False for the specified parent table.
For example, in order entry:
// for orderhea
Set CascadeDeleteAllowed Customer.File_Number to False
This would make it impossible to delete a Customer record if an Orderhea records exist. Because a Customer is a critical part of an order, this rule would make good business sense. Once set, you would never have to worry that deleting a customer or that any parent of the Customer table might delete the order. If an order exists, the delete would be cancelled and rolled back.
You can check whether CascadeDeleteAllowed is set by calling IsCascadeDeleteAllowed.
CascadeDeleteNull allows child DDs to specify if they should be deleted or have their child to parent relationship set to null.