Before Command hook
Use this hook to perform additional actions before the custom form
command is executed. This hook can use actual values of the form fields. You
can cancel the execution of the command by calling the
choice.again()
function. If multiple records can have
been selected to be processed.
Example:
function extern function.publish.before.command()
{
|* Publishing only for manufactured items
if tcibd001.kitm <> tckitm.manufacture then
choice.again()
endif
}
Note: This is an alternative for the
Is Enabled
hook described earlier. You can keep the
command enabled and this hook gives a message if an item should not be
published.