After Command hook

Use this hook to perform additional actions after the command is executed. This hook can use actual values of the form fields.

If the standard hook must be executed before the extension hook is executed, you can force the standard hook to execute anytime you prefer. This can be achieved by calling the command.super() function.

This example shows that the delete action is aborted if one of the selected records cannot be deleted.

function extern void mark.delete.after.command()
{
        command.super()
|* Not allowed to delete if purchased item is in selection 
        g.pur.selected = false
        do.selection(false, check.pur)
        if g.pur.selected then
                message("Not allowed to delete purchased item")
                choice.again()
        endif
}

In the Function hook:

function check.pur()
{
        if tcibd001.kitm = tckitm.purchase then
                g.pur.selected = true
        endif
}