Skip to main content
Answer

Using User Default Branch as Filter in GI

  • April 21, 2025
  • 4 replies
  • 195 views

Forum|alt.badge.img

Hi there everyone. For a while, our company has struggled with allowing reports to be accessible to employees, while making sure that they did not have access to other branches financial information.  However, we still want branches to be able to see each other’s inventory values, therefore we can’t set up Access Roles for each branch as is suggested in this post.
 

https://community.acumatica.com/configuration-and-installation-114/restrict-access-scenario-give-a-user-access-to-specific-branch-should-only-view-inventory-quantity-from-other-branches-11782


The only solution lately (that I have been able to manage) is to either create a separate GI or report for each branch. However, as of 24R1, we have been able to tie in another GI as a data source, which lead to the creation of the attached GI.  It should allow you to always load the current user, and get their default branch ID.  By using this as a data source, you can set a filter for the current GI that makes it so that the branch or SiteID must always be equal to the user’s default BranchID.  It may not be a perfect solution for everyone, but I figured it was a good start and might be worth sharing. 

I don’t recommend just plugging in this report to your Acumatica right away and expecting it to work!! I would look at the conditions and modify them as you see fit. When you load the report, it should only show one row per employee.  If it does not, you can expect duplication issues when trying to run whatever GI you use this as a data source in.

I’m hoping this could be a useful tool to you all, or at least could be a jumping off point for anybody with this issue.  If anybody has either recommendations for improvement, or a better solution, I would love to hear them. I would be more than happy to also answer any questions anybody might have about the report below. 
 

Note: Some of the conditions are specific to my company.  We only have one Site for every branch.  The “Does not Equals” conditions are to restrict the report from trying to pull in Site IDs that were added to one of our branches when we first moved to Acumatica that are not used.  Our Office branch is the only one without a SiteID. The idea of utilizing the logic from SOOrder.OwnerID was from this post: 

 https://community.acumatica.com/reports-and-generic-inquires-115/gi-to-default-to-show-values-in-userpreferences-defbranchid-11967

Best answer by gdewald

@Laura, thank you for the clarification! Currently, we do not have a way to stop employees from being able to select branches that are not their default branch. With that being the case, we might keep utilizing this GI, as we disabled employees from being able to actually change their Default Branch. That way the only financial data those employees can see are for the branch they work at.

4 replies

lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • April 21, 2025

Hi ​@gdewald ,

We’ve found this customization package to be useful:

https://github.com/Acumatica/CurrentBranchPlaceholder

It adds the DAC PX.Objects.Common.CurrentBranchPlaceholder, which can be used to filter in Generic Inquiries.

Hope this helps!

Laura


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • April 21, 2025

@lauraj46 Thank you very much! Is CurrentBranchPlaceholder meant to default to the user’s default branch then? Or is it for the Branch that one is able to set in the top right corner of the screen of Acumatica?


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • April 21, 2025

Hi ​@gdewald ,

It's the branch at the top right corner.  

Laura 

 

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • Answer
  • April 21, 2025

@Laura, thank you for the clarification! Currently, we do not have a way to stop employees from being able to select branches that are not their default branch. With that being the case, we might keep utilizing this GI, as we disabled employees from being able to actually change their Default Branch. That way the only financial data those employees can see are for the branch they work at.