Is Derived hook
Use this hook to indicate whether the field is derived. If a field is
derived, then the field is made read-only in the UI. The difference with the
<field>.is.readonly()
hook is that the field
value can be changed within other hooks of the extension, for example in the
<field>.update()
hook. If a field is read-only,
its value cannot be changed.
Example:
function extern boolean tdsls401.pric.is.derived(long mode)
{
select txprc100.fixd
from txprc100
where txprc100.item = :tdsls401.item
as set with 1 rows
selectdo
|* Item price is fixed, user cannot change it
return(true)
endselect
return(false)
}
function extern tdsls401.pric.update(long mode)
{
select txprc100.pric
from txprc100
where txprc100.item = :tdsls401.item
as set with 1 rows
selectdo
tdsls401.pric = txprc100.pric
endselect
}