Hi All,
Build 23.212.0024
This question has resulted from debugging work we’ve done related to another question here:
We ran an SQL profiler to attempt to debug the above issue where a processing screen is acting differently depending on whether it is run manually by a user or run using an automated schedule.
It revolves around an issue we’re finding when the query that builds the list of rows for the processing screen, Acumatica is appending different predicates to the where clause of the SQL depending on whether the it is run by a user or by an automated schedule.
Specifically the BranchID field
When run by a user, the SQL generated includes the following predicate:
( [POReceiptLine].[BranchID] IS NULL OR ( [POReceiptLine].[BranchID] IN ( 23, 24))
However when run by an automated schedule, the predicate becomes this:
[POReceiptLine].[BranchID] IS NULL
The tenant in question has two branches and POReceiptLines are being set with the relevant BranchID and not NULL.
Setting the BranchID in the Automated Schedule maintenance screen makes no difference. You would imagine that leaving the Branch unset on Automated Schedule maintenance screen should take all branches into account (but instead it seems to be setting the BranchID IS NULL part of the where clause).
Therefore when the automated schedule is running the processing graph, zero rows are returned because the BranchID is not NULL.
Can anyone explain or provide a way of controlling that particular element of the where clause?