Before Mappings hook

Use this hook to read data before the custom context message is built. This hook can use actual values of the (table) fields that are used in the standard context messages.

As an alternative you can also read the data with a function mapped to an element in the field mapping. But in case you require multiple values of the same table, we recommend that you use this hook.

In this example, the Item Group of the Item is read. Then the tcmcs023 fields can be used in the field mapping. In this way the contextual widgets/apps also have the information of the Item Group of an Item.

function extern long before.mapping.hook.com.infor.ln.businesscontext_1()
{
        select  tcmcs023.*
        from    tcmcs023, tcibd001
        where   tcibd001.item = :tcibd001.item
        and     tcibd001.citg refers to tcmcs023 unref clear
        as set with 1 rows
        selectdo
        endselect

	return(0) 
}