The illustration below shows the selection menu am talking about
Here is a sample code to achieve it. First some rules;
- Identify the menu options you want to display to users i.e invoice,receive, receive and invoice
- Identify the default option
- Craft a descent statement to accompany the dialog
Time to implement your dialog
selection := DIALOG.STRMENU('Order,Received,Processing,Finished',1,'Please select option to update status of transaction');
IF selection = 1 THEN BEGIN
Status := Rec.Status::Order;
MESSAGE('Status of order %1 successfully updated to ORDER',Rec."No.");
END ELSE IF selection = 2 THEN BEGIN
Status := Status::Received;
MESSAGE('Status of order %1 successfully updated to RECEIVED',Rec."No.");
END ELSE IF selection = 3 THEN BEGIN
Status := Status::Production;
MESSAGE('Status of order %1 successfully updated to PROCESSING',Rec."No.");
END ELSE IF selection = 4 THEN BEGIN
Status := Status::Finished;
MESSAGE('Status of order %1 successfully updated to FINISHED',Rec."No.");
END;
Details of the function
DIALOG.STRMENU(list of menu options, default choice represented as an integer, message to accompany dialog);
The function returns an integer
please note;
"selection" is an integer variable.
"Status" is a table field whose options include {Order,Received,Production,Finished}
The text in message() maybe declared under text variables
Cheers!
No comments:
Post a Comment