Hi,
I have extended runbase class for creating dialog box. But when i run the code dialog box is not opening. Here is my code
class CustCreateDialog extends RunBase { DialogField fieldAccount; DialogFIeld fieldGroup; CustTable custTable; CustTrans custTrans; CustAccount custAccount; CustGroupId custGroup; } -------------------------------------------------------------------------------------------------------------------------- protected Object Dialog() { Dialog dialog; ; dialog = super(); // Set a title for dialog dialog.caption( 'Simple Dialog'); // Add a new field to Dialog fieldGroup = dialog.addField(extendedTypeStr(CustGroupId), 'Customer Group'); fieldAccount = dialog.addField(extendedTypeStr(CustAccount),'Customer account'); return dialog; } ------------------------------------------------------------------------------------------------------------------------- public boolean getFromDialog() { // Retrieve values from Dialog custAccount = fieldAccount.value(); custGroup = fieldGroup.value(); return super(); } ------------------------------------------------------------------------------------------------------------------------- public void run() { while select AccountNum, CustGroup from custTable where custTable.AccountNum == custAccount && custTable.CustGroup == custGroup join Voucher, AmountCur, TransDate from custTrans where custTrans.AccountNum == custTable.AccountNum if (custTable) { // Shows retrieved information info( strFmt('%1 -- %2 -- %3 --- %4 ---%5' , custTable.AccountNum, custTable.name(), custTrans.Voucher, custTrans.AmountCur, custTrans.TransDate)); } else { error( 'Customer Account not found!'); } } -------------------------------------------------------------------------------------------------------------------------- public static void main(Args _args) { CustCreateDialog custCreate = new CustCreateDialog(); // Prompt the dialog, if user clicks in OK it returns true if (custCreate.prompt()) { custCreate.run(); } }
Regards,
Ram