在AX中使用环境变量 [英] Using environment variables in AX
本文介绍了在AX中使用环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能在AX中使用Windows环境变量?
Is there any possibility to make use of windows-environment-variables in AX?
示例:
属性NormalImage
.我想用某事.例如%USERNAME%,而不是显式用户名.例如,在类"中,我可以使用WINAPI
宏并引用用户文件夹变量(例如CSIDL_MYPICTURES
)来访问每个用户的路径.在AOT-object-properties中,不可能引用宏...
Property NormalImage
on a MenuItem
. I'd like to use sth. like %USERNAME% instead of the explicit username. In Classes for example I can use the WINAPI
macro and refer to a user-folder-variable, eg CSIDL_MYPICTURES
, to access the path per user. In AOT-object-properties there's no possibility to reference to macros...
有什么方法可以做到这一点?
Any way to achieve this?
推荐答案
获取客户端名称和计算机名称的示例
An example of getting the client name and machine name
static void testGetClientMachineName(Args _args)
{
str localClientname, terminalServerName;
;
localClientname = System.Environment::GetEnvironmentVariable('CLIENTNAME') ;
info(localClientname);
terminalServerName = System.Environment::get_MachineName();
info(terminalServerName);
}
这篇关于在AX中使用环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文