User Relations [Dynamics AX 2009 vs AX 2012, UserExternalParty and DirPersonUser Tables in AX 2012]


We all know that how we used to manage user’s relationship to the organization in AX 2009.

Users can be internal, such as employees, or external, such as vendors, customers, or business relations. After you specify user relations, a user’s information (such as employee ID or customer account ID) is automatically displayed in fields when that user opens an Enterprise Portal page. [MSDN]
Below is the screen shot from AX 2009.

r 50

And to find out whether user is linked as Customer/Vendor etc. – we used to use EP class static methods


Code : SysCompanyUserInfo::current().VendAccount != ”;


Code: SysCompanyUserInfo::current().CustAccount != ”

We were using SysCompanyUserInfo table to get the information in AX 5.0

But, in AX 2012 : We make use of UserExternalParty Table to get the relation details. Below is the screen shot of AX 2012 – User relations



Code in AX 2012 : UserExternalParty::existUserEntityType(curUserId(), UserExternalPartyEntityType::Vendor);


Code in AX 2012 : UserExternalParty::existUserEntityType(curUserId(), UserExternalPartyEntityType::Customer);

We can find out whether the user is external user by using EP::IsExternalUser() method in AX 2012.

Also we have a table called DirPersonUser which will help to get the details of the custAccount/VendAccount/BusRelAccount etc

AX 2012:

DirPersonUser    dirPersonUser = DirPersonUser::current();



vendor account : VendAccountManager::getSelectedAccount();

AX 2009:

SysCompanyUserInfo      sysCompanyUserInfo = SysCompanyUserInfo::current();




You can compare EPQuery::makeMyCustomerSelfServiceQuery method in AX 2009 and AX 2012 for more details.

Happy Dax6ng,

Sreenath Reddy G


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: