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:

  1. We need to create a parameter that will store a current Branch.
    1. 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.
    2. 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.
    3. It also makes sense to make this field as required to not provide any data if there is no current branch.

    Generic Inquiries Parameters

  2. Now we need to apply a filtering condition by this parameter:
    Generic Inquiries Conditions

That is it! Now you GI filters out all branches that is not current!
Hope it helps!

Leave a Reply

Please rate*

Your email address will not be published. Required fields are marked *