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 Branch.
- This parameter should not be visible for user, so he can’t change it. To do this we can set Hidden flag to False. Hidden flag column is hidden by default so please check columns configuration.
- Default value can be taken from any of the the existing field where this default is used. Just for example – if you create a new Invoice (or order or payment, etc) the Branch field will be automatically populated by Acumatica. This is defaulting behavior that we can reuse in GI. SO if we set Schema Field to the field that has a default to current branch, the same value will appear in our GI. Please note that it is not necessary to join table in SQL to use it as a Schema Field. You can just mention it.
- It also makes sense to make this field as required to not provide any data if there is no current branch.
- Now we need to apply a filtering condition by this parameter:
That is it! Now you GI filters out all branches that is not current!
Hope it helps!