October 16, 2012

Types of delete action

Types of delete action

In Table node there is a sub node called "Delete Action". In axapta there is mainly three type of delete action. Each of them have their own specific use. Here is the simplest defination for each of them.
Cascade
A cascading deletion action will delete all records in the related table, where the foreign key is equivalent to the primary key of the current table. That is, deleting the parent record will also delete the child record(s) in the related table.
This cascading will take place whether the deletion is performed in code or directly by a user through the user interface.
Restricted
A restricting delete action will raise an error message if the user tries to delete a record, where records exist in the related table where the foreign key is equivalent to the primary key of the current table.
This error will only appear if the deletion is performed through the user interface. A deletion from X++ code will be allowed to proceed and will not be cascaded to the related table. In this case the programmer should call .validateDelete() themselves prior to the call to .delete()
Cascade+Restricted
This delete action normally works as a Restricted delete action. However if the deletion is performed through X++ code, no error will be raised and the deletion will be cascaded to the related table.


for more details on delete action follow these links


- Harry



No comments:

Post a Comment

Thanks

Note: Only a member of this blog may post a comment.