DtvLong dal_cch_get_rec ()

When creating a new record in a relation or type mask, this function searches for an existing entry in the master table of the entity, which corresponds to the current entry in the master data field of the relation or type mask.

Input Parameters Significance
none -

Output Parameters Significance
none -

Return Code Significance
0 no error
1 no record found

Can be invoked as post_field-userexit at master attribute fields in relation or type masks.

If a master record is found, DataView will automatically enter all following master attributes visible in the relation or type-mask.

If several master records are found, DataView will enter all following master attributes of the record found first.

If no master record is found, DataView will output a message. The user can only leave the master attribute field by either cancelling the insert operation, or entering nothing, or specifying an entry that can be found in the master table.

This userexit only makes sense in insert mode of mask edit state.

Using this userexit you can simply prevent new entries in relation or type masks if no master record exists for entities the relation is directed to. Thus you force the user to create master records in the linked entity first and only then creating a relation. Simultaneously you assure the automatic display of all visible master attributes in the relation or type-mask. The user only has to add relation or type attributes.