Skip to main content

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

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