Hello awesome community!
I'm still very new to D365, and I'm working on my first report so please help the newbie! public static void SalesTable_Pre_run(XppPrePostArgs args) { FormRun sender = args.getThis(); FormDataSource fds = sender.dataSource(1); SalesTable _salesTable = fds.cursor(); if(_salesTable.DocumentStatus == DocumentStatus::Confirmation) sender.control(sender.controlId(formControlStr(SalesTable, MyMenuItemName))).enabled(true); else sender.control(sender.controlId(formControlStr(SalesTable, MyMenuItemName))).enabled(false); } }
After I did the build, when I go to the All Sales Order screen and choose one of the sales order, the screen freezes and times out.
Please can anyone tell me what I'm missing or doing wrong?
Thanks in advance!