AYETY
AYETY

Reputation: 710

Using dialog box or creating the form?

Which is the best way to do the following:

I have a form_A, where is a menuitem button that opens form_B with the values taken from form_A using args.

What I'm asked to do is to have an intermediate form between form_A and form_B with 1 checkbox in it and if checkbox is ticked the destination form_B's quantity field should be with negative sign.

Should I create for it a form in AOT or it can be done by dialogBox classes?

Pls guide me with some code if possible too.

thanks.

Upvotes: 0

Views: 1035

Answers (1)

Maxim Lazarev
Maxim Lazarev

Reputation: 1254

You can use Dialog to prompt the user:

Dialog      dialog;
DialogField field;
;
dialog = new Dialog("My Dialog");
dialog.addText("Select to display negative values:");
field = dialog.addField(extendedTypeStr(NoYesId));

dialog.run();
if (dialog.closedOk())
{
    info(field.value());
    //Add result to args ...
}
// Call the form ...

But I would suggest using a simple DropDialog form. Example of Drop Dialog:

MainAccountListPageBalanceParameters - General Ledger -> Common -> Main Accounts -> Parameters button.

VendRequestAddVendor - Accounts Payable -> Common -> Vendors -> All Vendors -> Add vendor to another legal entity

PayrollIssueWorkerPayDialog (check cross references if you want to find out where it is called from).

Upvotes: 3

Related Questions