Get Current Company Name

Hi All, Want to give you a short trick – how to extract company name from the currently logged in user: Company Name PX.Data.PXLogin.ExtractCompany(PX.Common.PXContext.PXIdentity.IdentityName) Here we have 2 things: PXSessionContext (PXContext.PXIdentity) – System class that stores environment variables in session like User, TimeZone, Branch, Locale. Actually this is used for user authentication authorization. However user here is stored with a full notation – like “user@company:branch”. But we can cut a part of it using special rules. PXLogin – set of tools that can help to login user and use username. In our case it can extract company name right from full identity name. Company ID PX.Data.Update.PXInstanceHelper.CurrentCompany Here we have an… Read more

Generic Inquiry with Filtering by Current Branch

Hi All, Want to show you an option how can you filter documents in Generic Inquiry by currently selected branch. In reports you have an option to use AccessInfo.BranchID, but in generic inquiries unfortunately such option is not available. You also can’t join this table as AccessInfor is virtual table that does not exist in database. However there is a workaround – we create a parameter in GI, that will get a default value from any branch field in Acumatica that has a default value from current branch and than use this filter for filtering. Let me guide you: We need to create a parameter that will store a current… Read more

Reporting Currency Conversion on the Fly

Hi All, In Acumatica you can use standard currency translation tool to translate base currency to any other reporting currency. However this process is available only for GL Balances. You can really translate AP/AP SO/PO balances and total using the same approach. Here I want to give you the idea of how can you do on the fly currency translation from any currency to any currency on any document in Acumatica for reporting purposes. Problem The biggest problem of this task are Rates. In Acumatica we store rates assigned to effective date. But if you have other dates where are no rates defined, we need to user the closest previous… Read more