Context Messages tab

Use this tab to specify context messages and the corresponding mappings and hooks.

General Information
Table
The table name and description.

To edit or view the session in the Session Editor, click the hyperlink.

Context Messages
Context Messages grid
The grid shows the context messages from the model.

The Hidden column can have these values:

  • No: the context message is sent for this table and is also available for the tables that refer to this table.
  • Current level: the context message will not be sent for this table, but is available for the tables that refer to this table.
  • Child level: the context message is sent for this table but is not available for the tables that refer to this table.
  • All: the context message is not sent for this table and is not available for the tables that refer to this table.

For context messages with the 'hidden' element set to true, a strikethrough font is used.

Click Add to add a context message to the grid. Only messages that are present in tagencontextmessages.xml are allowed. Code completion is supported. For context messages that are added manually, you cannot specify the table and sequence number.

To remove a context message from the grid, right-click the message and select Remove. This is only possible for context messages that are not present in the active Reference Model.

The Refresh button performs these actions:

  • Refresh the context messages for all referenced tables.
    • Read the context messages from the referenced model.
    • Compare them to the present ones related to that table.
    • Add/delete if required.
    • Change only the context messages that are not manually changed.
  • This refresh is also executed on save if a referenced table has been added. You must confirm this; the save will not be performed if you do not choose to refresh. If this referenced table has a table model, the context messages are copied from this model. If there is no model, the context messages are copied from the reference model. Note that the sequence number makes the context message unique if the same context message is linked to the same table multiple times.

The grid synchronizes with the Mapping section.

Mapping
Mapping grid
This editable grid shows the Mapping elements from the model.

This table shows the functionality required for the columns in the grid:

Column Description
Target These values come from the model; they are the placeholders in the XML template of the context message.
Type The type of mapping. This table shows the possible values for this column:
Type Description
field The placeholder can be replaced directly with the value of the field.
none There is no mapping; the element that refers to this mapping in the XML template of the context message is skipped when the message is constructed.
hook A hook will calculate the value for the placeholder. Selecting the row automatically loads the hook into the hook editor.
function A function is called; the return value of the function is used for the substitution.
Source The possible values for this column depend on the type of mapping specified in the Type column. This table shows the possible values for the Source column:
Type of mapping Value for Source column
field A table field from the current table
none Empty
hook Empty
function A function from the Infor ES Programmers Guide (Infor Customer Portal KB2924522), Functions hook, or from a library that has been linked to the model by “pragma used dll” in the Include hook.
Condition Hook/Before Mappings Hook/After Mappings Hook
Click these links to open the corresponding hooks in the source viewer in the Hook section.
Hook
Source viewer panel
This section is similar to the Hook section on the Tables page.

The Inherit check box indicates whether the hook type is 'inherit' or 'override':

  • If you select this check box, the current hook is deleted and the corresponding hook from the referenced table is displayed. The hook editor is read-only.
  • If you clear this check box, the hook is copied and can be edited. The new hook overrides the logic of the inherited hook.

If there is no hook to inherit, the Inherit check box is disabled.