I am attempting to use a BAQ to return search results and populate fields in my UD01 table. I have been successful in following the solution in post Multi Field Bindings - Search-Value-Set using a standard search. However, when I try to get this to work for a BAQ search (or Quick Search) not all the data populates. Has anyone been successful in setting up a BAQ search to work?
I have populated the search-show > Parameters > Search Options > Search Type = BAQ and Search Name = my BAQ name. I wasn’t sure if I should check “Return Multiple Tables but have tried it checked and unchecked…didn’t make a difference.
When I test the search it appears to use my BAQ as I am prompted to enter my parameter, which is a Sales Order Number and I can then select from the rows returned. The data fields showing in my search are the fields returning in my BAQ.
My issues is that once I select a record, it does not populate all the data – it only populates the Sales Order Number (SO#). It almost acts like it is following the Standard Search and not what I setup tin the search-value-set.
It is like my BAQ is being ignored and the search is using the Standard Order Search as I did a test using the “CustomerName” field which is returned in the standard search - instead of the field in my BAQ and it populated to my form.
One thing I noticed is after the ExecuteBaq there is a GetList that runs and this returns data from the standard Order search. Should this be executing?
Does your search-value-set have anything in the Ep Binding or Value? I have populated these and left blank and that didn’t seem to make a difference since I have the Parameters populated.
Okay, so the first thing I see is you have multiple events which is why you have multiple searches coming up. I got rid of all but the SalesOrder_c_OnClick.
Okay–after some extensive testing, I’m convinced this is a bug.
I can get it to work when the ‘Like’ field is using a UD table like UD103.Key1, but not from an Erp table. I tried your BAQ, a simple Order BAQ I made, and a simple PO BAQ that I made. All of them return undefined.
Here’s the interesting bit.
When it’s a UD table, the multiple search results are populated in ErpSearchResults with the one you select in searchResult (Proper BAQ Column names and all).
However, for the Erp tables, it shows the proper search results in ErpSearchResults, but when you select one, the row in searchResult is not correct. It’s not from the BAQ–it’s from the SalesOrderSvc.
And to touch on your earlier point about the GetList being called after the ExecuteBaq, when I do the UD103 one, it shows the UD103List table which does not include my BAQ columns, but that does not seem to matter as shown by the prior screenshots.