Hi Folks, Here is the code to identify the AOS server name /Instance Name In Axapta. static void JobForAOSSeververInstantname(Args _args) { xSession curSession; SysClientSessions clientSessions; SysServerSessions serverSessions; int usrSessionId; int serverId; str aosId; str instanceName; ; curSession = new xSession(); usrSessionId = curSession.sessionId(); select firstonly ServerId from clientSessions where clientSessions.SessionId == usrSessionId; serverId = clientSessions.ServerId; select firstonly * from serverSessions where serverSessions.ServerId == serverId; aosId = serverSessions.AOSId; instanceName = serverSessions.Instance_Name; info(instanceName); } Thanks, Brahma
This blog has posts with AX Developments and X++ Codes for your Day to day use