Hello all:
I am attempting to create a GI that allows the user to retrieve records not only by individual branch, but also by an entire Company (included any branches under it). I know this has been implemented in various built-in GIs and Reports, so I used on of those as my base - the PR-Employee Pay Rates and Earnings GI. I see this GI is using the `ARDocumentFilter.OrgBAccountID` Schema Field for its `OrgBranchID` parameter. I further noticed that this parameter is used in the Condition section: e.g. PRPayment.BranchID Is In [OrgBranchID].
I have created a GI that mimics this approach.
While it works as expected when selecting an individual branch, it does function as expected when selecting a Company. Specifically, records from Branches from another Company are brought in. For example, I have a Company with ID of 1000. This Company has three Branches: 1001, 1002, and 1003. However, if I select the 1000 Company in the GI, the Inquiry brings in not only records from branches under that company, but also records from another Company (3503 which is from another Company with ID 3500).
What might the issue be? The 3503 records also show up when I pick the 3500 Company (which is expected). I have also tried using the `'OrganizationBranchReportParameters.OrgBAccountID` field with the OrigBranchID parameter (as this seems to be what the reports use), but with the same results. Thanks for any advice.