Could someone give me some pointers on where I need to look to modify what is shown on the autocomplete dropdown for products?
We have multiple products with the same name, but different category tree.
I need to show the hierarchy with the product as we type, it seems that it is something to do with ‘sqs’ but I can’t find any documentation on how to create
my own, or how to modify the response.
The first issue is - is that dropdown handled by your browser, or by SuiteCRM? If you type a value that you’ve never entered before, does it auto-complete?
We actually have the same issue. I think the ideal solution would be the user inputs the category (with either a dropdown or quicksearch box) and then the product field quicksearch is filtered against that.
Our workaround is adding the product category in the popup for selecting a product. You could also show that category in the line items if you wanted. This basically means the quicksearch isn’t used.
I ended up creating a custom quicksearch.js that adds the
String formatResult ( oResultItem , sQuery )
method to the YUI autocomplete,
with some code that checks for a couple of custom functions and then calls them if they exist.
That way in line_items.js (any anywhere else) I can set the following in the sqs_objects:
"render_result_heading": function (item) {
return item[8];
},
"render_result_label": function (item) {
return item[0];
}
and change what and how is returned in the quicksearch.