sending msg to online users in AX 4.0

sangeethakdsangeethakd Member Posts: 2
edited 2007-04-20 in Dynamics AX
hi all,
i have come across a problem.could you guys help me with it ???
how can we send msg to online users from axapta 4.0???

thanks and best regards
sangeetha k

Comments

  • kashperukkashperuk Member Posts: 53
    See SysUsersOnline form for an example

    Also, in case that doesn't satisfy you, net send command is available

    Good luck!
    Vanya Kashperuk,
    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
  • MikerMiker Member Posts: 105
    Hi
    The form you need is SysUsersOnline
    Just put this code on your button

    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);
                }
            }
    
        }
    }
    
    going to Europe
Sign In or Register to comment.