How to use Local Menu Message through Coding?

By | April 29, 2016

In Sage X3, we may have to display a particular message for several times based on the certain condition. We can define such frequently used messages in a local menu and can access them through coding.

To access the message defined in a local menu in coding, Sage X3 provides an inbuilt function:

mess(exp_num, exp_chap, exp_lan)

where,

exp_num: Number of the message in the section.

exp_chap: Integer expression giving the number of the message section.

exp_lan: Integer expression indicating which message file should be used.

mess: Gives access to Adonix service messages or those which may have been specifically defined for the application. Message files are arranged in sections with a group of messages for each chapter.

– The value 0 will be given to exp_lan to access the Adonix message file and value 1 otherwise; this argument is optional and is set 0 by default. The text of the message depends on the language used.

– The result is a Char type.

For e.g,

  1. Display message ‘Please wait, printing in progress’
    Infbox mess (24, 2)

It will display title of the second section, defined in the file.

Local Menu Display Message

  1. Application message (for a set of texts this will be the list of input characters)
    Infbox mess (2, 0, 1)

Local Menu Application message