I’m using the Search component for global search in a top nav bar. It searches the account object, but rather than the select action navigating to an account detail page, I want to run a snippet that passes the account id to a condition on a model. I have the snippet ready, but how do I access the context of the returned search result row?
Here’s my snippet that was originally designed to work with a table row action:
var params = arguments, item = params.item, row = item.row; $ = skuid.$; //Updates the URL to "navigate" to "ClientView" for the selected client. history.pushState(null, null, 'ZZZZ_PractiFI?p=clv&id=' + row.Id); //Empties the "OrgView" models, which also hides the content of that include. var orgModel = skuid.model.getModel('OV_Org'); orgModel.emptyData(); //Filters the client model for the selected client, which refreshes "ClientView-Basics". var clbModel = skuid.model.getModel('CV_Client'); clbCondition = clbModel.getConditionByName('Id'); clbModel.setCondition(clbCondition, row.Id); clbModel.updateData();<br>