Hi,
I've created a plugin which adds a custom search query to the Purchase Order and Sales Order forms.
This query uses a SQL view to add some columns which aren't on SO_Main/PO_Main. One of these columns is FurthestETAToSH.
I have a search filter which filters on FurthestETAToSH. Understandably, I can't use this filter with the builtin queries, since FurthestETAToSH doesn't exist in those queries.
The filter does work when I use this custom query, that's expected.
What I didn't expect, is that that if I open the PO or SO form, I get an error saying "Invalid column name FurthestETAToSH". JIWA remembers the last query and filter you use, and for me, that is my custom query and filter. JIWA should be opening the form with that query, and then the filter would work.
So TLDR: Do you know why, when I use a filter that depends on a column that's not in any of the default queries, and I'm using a custom query which does have the column, why I get this error when opening the SO/PO form?
I've attached the plugin, if you want to check it out.
I've put a breakpoint in the Search_Showing method, and it doesn't get hit when opening the form. That makes sense this error is happening on like PO/SO ReadStart/ReadEnd. Perhaps there's some way I can add these queries on ReadStart/ReadEnd?