Requirements for Deletes
The Data Dictionary Object structure requirement for a delete is a bit more complex. Because deletions may alter parent records, the parent DDO structure must be complete. If you wish to allow cascade deletes (the deletion of child records), then your DDO structure must also contain all required child DDOs to perform the cascade delete. For example:
Procedure Construct_Object
Forward Send Construct_Object
Set Main_File to Orderhea.File_Number
Set Add_Server_File to Customer.File_Number
Set Add_Server_File to Sales.File_Number
Set Add_Client_File to Orderdtl.File_Number
End_Procedure
Object oCustomer_DD is a Customer_DataDictionary
End_Object // oCustomer_DD
Object oSalesp_DD is a Salesp_DataDictionary
End_Object // oSalesp_DD
Object oOrderhea_DD is a Orderhea_DataDictionary
Set DDO_Server to oCustomer_DD
Set DDO_Server to oSalesp_DD
End_Object // oOrderhea_DD
Object oOrderdtl_DD is a Orderdtl_DataDictionary
Set DDO_Server to oOrderhea_DD
End_Object // oOrderdtl_DD
This DDO structure now contains the required child DDO, and deletions of OrderHea records are now allowed. However, these structures are rarely this simple. If the child DDO (OrderDtl) contained additional required parent tables, then those parent DDOs and all of their parent DDOs must also be present. The required DDO structure now might be:
Object oVendor_DD is a Vendor_DataDictionary
End_Object // oVendor_DD
Object oInvt_DD is a Invt_DataDictionary
Set DDO_Server to oVendor_DD
End_Object // oInvt_DD
Object oCustomer_DD is a Customer_DataDictionary
End_Object // oCustomer_DD
Object oSalesp_DD is a Salesp_DataDictionary
End_Object // oSalesp_DD
Object oOrderhea_DD is a Orderhea_DataDictionary
Set DDO_Server to oCustomer_DD
Set DDO_Server to oSalesp_DD
End_Object // oOrderhea_DD
Object oOrderdtl_DD is a Orderdtl_DataDictionary
Set DDO_Server to oOrderhea_DD
Set DDO_Server to oInvt_DD
End_Object // oOrderdtl_DD
See Also
Defining Data Dictionary Parent, Child and External Relationships