I want to pass account number of the active record to the second dialog(which opens when next is clicked in the form) , how can i achieve it?
Thank You sir.
One option could be, when opening the second dialog from the first dialog, you can also set a record or data in the Args object. Then in the second dialog, you can access the Args object and the record/data with element.args(). There are many examples in the application and online on how this is done.
But you can maintain the caller record. Below the code for 1st dialog form.
Public class Dialog1 extends formRun { TableNameForm1 form1Table; public void init() { form1Table = element.args().record(); } //calling the second form through code public void clicked() { Args args; Object formRun; args = newArgs(); args.record(form1Table); args.name(formstr(FormName)); formRun = classfactory.formRunClass(args); formRun.init(); formRun.run(); } }
Beow the code for 2nd dialog form.
Public class Dialog2 extends formRun { TableNameForm1 form1Table; public void init() { form1Table = element.args().record(); } //you can use form1Table buffer to get account num and use it in the 2nd form Control.Valuestr(form1Table.AccountNum); }
Thanks,
Girish S.
But the 1st dialog doesn't have any data related to the form which i needed in 2nddialog
You can maintain the caller record as first form DataSource and pass the same caller record while calling the 1st and 2nd dialog.
Thanks,
Girish S.
In the above scenario i need the data flow from 1st form to last dialog without 2nd dialog.is it possible? because the 1st opened dialog has no relation with form or 2nd dialog and no data also
Hi,
You need to pass the caller record of the first form DataSource. Using element.args().record - You will get the caller record - Pass the same buffer while calling the second dialog form.
Thanks,
Girish S.
André Arnaud de Cal...
292,162
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156