web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Using X++ to figure out which user the AOS runs under

PA-22040759-0 Profile Picture PA-22040759-0 6,194
This code will give you the AOS accounts domain and username:

public static void main(Args args)
{
InteropPermission permission;
str userName;
str userDomain;
;
permission = new InteropPermission(InteropKind::ClrInterop);
permission.assert();
userDomain = System.Environment::get_UserDomainName();
userName = System.Environment::get_UserName();
info(strFmt(@"%1\%2", userDomain, userName));
}

The code must be executed from the server tier.

Comments

*This post is locked for comments