from dev guide:
function extern boolean mark.delete.is.allowed()
domain fmfoc.oorg origin.of.order
if origin.of.order <> fmfoc.oorg.man then
function extern boolean add.set.is.allowed()
if <your condition> then
The 4GL engine will call one or more of these hooks just before the following event sections are executed:
Here commands are handled whose enabling depends on values of the whole occurrence. E.g. based on a status field the occurrence should be disabled and may not be deleted.
For editable overview sessions the MODIFY.SET command is handled.
For details session the MODIFY.SET, MARK.DELETE and TEXT.MANAGER commands are handled.
(MODIFY.SET influences whether the whole occurrence will be disabled).
read.view subevent of the main.table.io event
Here commands are handled whose enabling depends on the current view. E.g. a closed order does not allow lines to be added, or deleted. The order number field can be in the view.
For overview sessions the ADD.SET and GLOBAL.DELETE commands are handled.
For details sessions the ADD.SET command is handled.
For both types of sessions, the disabling of the DUPL.OCCUR command will be based the ADD.SET command, since DUPL.OCCUR is actually adding a record with default values.
after.choice subevent of the choice.mark.occur event
Here commands are handled whose enabling depends on whether records are marked. If one record is marked the DUPL.OCCUR, MARK.DELETE and TEXT.MANAGER commands are handled. DUPL.OCCUR is only handled in case the session has view fields, because the view may forbid lines to be added.