Examples
Two hypothetical examples of before/after set hooks for a ‘price’ attribute.
Before set hook:
| before set hook for attribute price; only set this attribute if status and type allow this
| ‘used attributes’ i.order and i.price are unused in this before set hook
long retl | return value to be checked
if i.type = ppmmm.type.external and i.status = ppmmm.stat.confirmed then
| do not set price attribute
io.cancel = true
endif
return(0) | OK
After set hook:
| after set hook for attribute price; only set this attribute if status and type allow this
| ‘used attributes’ i.status and i.type are unused in this after set hook
#pragma used dll oppmmmsox
if i.price > 999999.0 then
ppmmmsox.report.high.price(i.order)
endif
return(0) | OK