Use of STRMENU function in D365 BC

Use of STRMENU function in D365 BC:

(1) STRMENU is a function that displays a series of options.

(2) Syntax of STRMENU:

OptionNumber := Dialog.STRMENU(OptionString [, DefaultNumber] [, Instruction])

OptionString
Type: Code or text constant
A comma-separated string. Each substring in OptionString specifies an option on the menu.

DefaultNumber
Type: Integer
Use this optional parameter to determine a default option, which is highlighted. The options are numbered 1, 2, 3, 4, and so on.
*If you omit this optional parameter, the first option (1) is used as the default.

Instruction
Type: Code or text constant
Use this optional parameter to add a description to the option values.

(3) Let’s say, display Menu at the time of posting Purchase Order. (You can also refer to the Purchase posting and sales posting code units for STRMENU usage), as shown.

Code unit for display Menu at the time of posting Purchase Order

(4) You can use this function in various activities, like changes in records with display menu and so on.

(5) STRMENU display as shown.

STRMENU display

Creation and Posting of Item Reclassification Journal in D365 BC
How to Setup Customer Name field in Customer Ledger Entries in D365 BC
How to Define Default Value for Posting Date Field in Sales Documents
How to Define Default Value for Type Field in Sales Documents
StrMenuHandler Attribute– Microsoft Docs

Leave a Reply