This is for Acumatica ERP 2021 R2:
I need to get the Default Warehouse Site for the current user. This is shown as part of the UserPreferences DAC, and the field name is DefaultSite
Getting the UserPreferences seems easy enough:
var curUsr = base.Base.Accessinfo.UserID;
var usrPrefs = UserPreferences.PK.Find(graph, curUsr);
The problem is that the DefaultSite does not exist in the UserReferences DAC!
It exists in the SQL database table:
How do I get the DefaultSite field? It is NOT available to me in the DAC. I need it to retrieve the INSite record it references.
Here is a screenshot of my VStudio showing available fields, you can see that DefaultSite is missing.