After Command hook
Use this hook to perform additional actions after the form 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.
Example:
function extern void function.approve.order.line.after.command()
{
command.super()
txpurdll0001.publish.approval(tdpur401.orno, tdpur401.pono)
}
In the After Command Hook
of a Standard Form Command you can use
the function command.repeat(). This function executes the
standard form command again, after the current execution has finished. The
standard form command is not executed at the moment
command.repeat() is called, but the function
triggers re-execution after the current execution has finished.
In this example the exec.cont.process() form command prints a report. If the report is printed in another language than English (“2”), the command is repeated to print the report also in English.
function extern void function.exec.cont.process.after.command()
{
static string save.language(1)
if language$ <> "2" then
save.language = language$
language$ = "2"
command.repeat()
else
if not isspace(save.language) then
language$ = save.language
save.language = ""
endif
endif
}