Creating a Dialogbox to key in an amount

Hello all,

Im having difficulties to create a dialogbox to pop out and ask for an amount for user to key in

anyone can provide me a sample code for it ?

this is how im doing it currently :-

static void RolloverDividen(Args _args)

{

DialogButton diagBut;

DialogField dialogField;

FixDeposit tblFixDeposit;

str strMsg = “Rollover Fixed Deposit with Dividen ?”;

str strTitle = “Fixed Deposit Rollover”;

str strMsg2 = “Enter Your Actual Dividen Amount”;

str strTitle2 = “Fixed Deposit Rollover 2”;

;

diagBut = Box::yesNoCancel(strMsg,DialogButton::Yes,strTitle);

if (diagBut == DialogButton::Yes)

{

diagBut = Box::okCancel(strMsg2,DialogButton::Ok,strTitle2);

How do i insert the amount ?

Anyone can help ?

hi jessica

use this 2 get input from user

Int amount;

dialog dialog;

dilaogfield dialogfield;

dialog = new dialog(" ");

dialogfield = dialog.addFieldValue(extendedTypeStr(amount), amount);
dialog.run();
amount= dialogfield.value();

u can get value entered in dialogfield by this code

thank u friend…

i give it a try thank u ! =)

Dear jessica ,

I need invoice journal x++ code,can u send ledger to ledger invoice journal code…

Thanks in advance…

// Solution

static void RolloverDividen(Args _args)

{

DialogButton diagBut;

DialogField dialogField;

str strMsg = “Rollover Fixed Deposit with Dividen ?”;

str strTitle = “Fixed Deposit Rollover”;

real amt;

dialog dlg;

dialogfield dlgField;

diagBut = Box::yesNoCancel(strMsg,DialogButton::Yes,strTitle);

if (diagBut == DialogButton::Yes)

{

dlg = new dialog(" Fixed Deposit Rollover 2 ");

dlgField = dlg.addField(amt, “Enter Your Actual Dividen Amount”);

dlg.run();

amt= dlgField.value();

info (strfmt(“Amount entered was : %1” , amt));

}

}