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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / DaxGeek / Get the Current Active Comp...

Get the Current Active Company in Dynamics AX

Hossein.K Profile Picture Hossein.K 6,648
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

Comments

*This post is locked for comments