Hi! can anyone pls tell me how to create a dialog class?
*This post is locked for comments
Hi AXBOY,
Have a look at the documentation first: msdn.microsoft.com/.../aa877843.aspx
If you have specific questions, please update your question then with more details.
I provide sample code. Just test it and modify.
//This is a dialog to display a dropdown list of all Customer records
static void DialogScreen(Args _args)
{
Dialog dialog;
DialogGroup dialogGroup;
DialogField dialogField;
//Give a dialog name
dialog = new Dialog("SAMPLE");
//Specify a Label to the dialog field
dialogGroup = dialog.addGroup("Customer");
//Add the table field to use
dialogField = dialog.addField(extendedTypeStr(CustAccount));
//Run the dialog screen
if (dialog.run())
//Display the record fields if available
print dialogField.value();
//Halt the execution to display the dialog screen
pause;
}
Regards,
Sci
Hi, AXBOY
Use RunBase Framework (see)
Step 1:
client server static ClassDescription description(){return "@SYS54106";}
Step 2:
void run(){ // Local declarations. try { this.progressInit ttsBegin; // Reset the variables that were changed in the transaction. ... // Do the job. while select forUpdate myTrans... { progress.incCount(); progress.setText
ttsCommit; } catch (Exception::Deadlock) { retry; }}
private Query initQuery(){ query query = super() queryBuildRange qbr; ; qbr = query.dataSourceTable( tableNum(InventTrans)).findRange( fieldNum(InventTrans,DatePhysical)); if (!qbr) { qbr = query.dataSourceTable( tableNum(InventTrans)).addRange( fieldNum(InventTrans,DatePhysical)); } qbr.value(SySQuery::range(prevYr(PerDate),PerDate)); qbr = query.dataSourceTable( tableNum(InventTrans)).findRange( fieldNum(InventTrans,DateFinancial)); if (!qbr) { qbr = query.dataSourceTable( tableNum(InventTrans)).addRange( fieldNum(InventTrans,dateFinancial)); } qbr.value(SysQuery::value(perDate+1) + '..' + ',' + sysQuery::valueEmptyString()); return query;}
void run(){ // Local declarations. try { this.progressInit ttsBegin; // Reset the variables that were changed in the transaction. ... // Do the job. while select forUpdate myTrans... { progress.incCount(); progress.setText ... ... ttsCommit; } catch (Exception::Deadlock) { retry; }}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Tocauer 4
Community Member 2
Nayyar Siddiqi 2