To get the Current Logged In Company you can Use the curExt() function in AX.
Example :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | static void curExtExample(Args _arg) { str CompanyId; ;
CompanyId = curExt(); Info(CompanyId); }
You would also get the same result with below code as well.
static void curExtExample(Args _arg) { str CompanyId; ;
CompanyId = CompanyInfo::Find().DataAreaId; Info(CompanyId); }
|
Regards,
Hossein Karimi
*This post is locked for comments