Thursday 11 October 2012

Show User is already logged in in Axapta

If you would like to restrict single user name/Id to get multiple session in axapta, try below



select count(recid) from clientSession where clientSession.userId==curuserid() &&
                                                                         clientSession.status!=0                 &&
                                                                clientSession.sessionType==0;

    if(clientSession.recid>1)
    {
          for(myloop=1,myloop<=150,myloop++);
         {
            progress.incCount();
            progress.setCaption("Alert")
            progress.setText(strfmt("  '%1' is already logged-in",curuserid()));
            sleep(5);
         }
     infolog.shutDown(true);
    }

 

No comments:

Post a Comment