It looks like you're new here. Sign in or register to get started.
void clicked() { Dialog dialog = new Dialog("@SYS55324"); DialogField startTime = dialog.addField(typeId(timeOfDay)); DialogField interval = dialog.addField(Types::INTEGER); int i; FormListItem item; Session testSession; str message; ; super(); startTime.value(decround((timeNow() + 600) / 300, 0) * 300); interval.value(10); if (dialog.run()) { message = 'Soon Axapta will stop!!'; for (i = 0; i < onlineUsers.getCount(); i++) { item = onlineUsers.getItem(i); testSession = new Session(item.data()); if (testSession) { if (new AOSSessionInfo(item.data()).clientMode() == AOSClientMode::NotAOS) WinAPI::shellExecute("net", strFmt("send %1 %2", testSession.clientComputerName(), message)); else AOSSessionInfo::sendMessage(testSession.sessionId(), "Attention!", message); } } } }
Comments
Also, in case that doesn't satisfy you, net send command is available
Good luck!
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Inside Dynamics AX 4.0 in Russian - http://www.ozon.ru/context/detail/id/3714582
The form you need is SysUsersOnline
Just put this code on your button