Solved

Get the currently logged CompanyID and BAccountID

  • 27 November 2023
  • 1 reply
  • 40 views

Userlevel 3
Badge

Hi All,

Need to know how to get the currently logged CompanyID and BAccountID in the graph extension.

Can someone help me out?

Thanks

Bhagya

icon

Best answer by jinin 27 November 2023, 18:43

View original

1 reply

Userlevel 7
Badge +11

Hi @bhagyat25 
 

The Instance helper will provide the CompanyID
 int? companyId = PXInstanceHelper.CurrentCompany;

For UserId and Username, you can obtain them from the AccessInfo

 string userName = Base.Accessinfo.UserName;

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved