Use the curExt() function to get the active company in AX; static void curExtExample(Args _arg) { str CompanyId; ; CompanyId = curExt(); Info(CompanyId); } You would also use the following with the same results. However, the above is much more elegant. static void curExtExample(Args _arg) { str CompanyId; ; CompanyId = CompanyInfo::Find().DataAreaId; Info(CompanyId); } Take Care!