Customer defined field logic

With the hooks on CDF level you can let the CDFs behave like standard fields. This applies to making the field mandatory, update them automatically based on changes of other fields, validations, and so on.

This table shows the hooks that are available for each individual CDF:

Name

Signature

Is Never Applicable

boolean <cdf field>.is.never.applicable(long mode)

Is Applicable

boolean <cdf field>.is.applicable(long mode)

Is List Entry Applicable

boolean <cdf field>.<constantname>.is.applicable(long mode)

Is Derived

boolean <cdf field>.is.derived(long mode)

Is Mandatory

boolean <cdf field>.is.mandatory(long mode)

Is Read-only

boolean <cdf field>.is.readonly(long mode)

Make Valid

long <cdf field>.make.valid(long mode)

Is Valid

boolean <cdf field>.is.valid(long mode)

Update

long <cdf field>.update(long mode)

The input argument for all hooks is the mode.

This table shows the Mode values:

Mode

Description

DAL_NEW

A new record is being inserted.

DAL_UPDATE

An existing record is being updated.

In all hooks, except for the <cdf field>.is.never.applicable() hook, all field values of the current table record are available.

If CDFs are dependent on standard fields or other CDFs – in other words if in the hooks the values of other fields are used – the hooks are re-executed when the field(s) on which the CDF depends are changed. Those dependencies are registered automatically.

For more information about the hooks, see the corresponding -field.<hook>()of the standard Data Access Layer in the Infor ES Programmers Guide (Infor Customer Portal KB2924522).