How-to Guide
Nue Platform
Lookup Filter Plugin
3 min
this article outlines how we can add a custom lookup filter plugin to apply additional filters to a lookup component displayed on nue ui in nue on salesforce implement plugin interface the parameters of this plugin interface include the following object api name the object’s api name, e g , ruby linebucket c lookup field api name the lookup field’s api name, e g , ruby billingcontact c public class demosearchplugin implements searchlookupoptionplugin{ public list\<lookupoption> searchlookupoptions(string objectapiname, string lookupfieldapiname, string queryinput, map\<string, object> values) { string condition = '%' + queryinput; list\<contact> contacts = \[select id, name, firstname, lastname from contact where name like \ condition limit 10]; list\<lookupoption> lookupoptions = new list\<lookupoption>(); for(contact contact contacts) { lookupoption option = new lookupoption(); option id = contact id; option name = contact name; option optionname = contact salutation + ' ' + contact firstname + ' ' + contact lastname + ' (' + contact title + ')'; option category = 'primary contacts'; lookupoptions add(option); } return lookupoptions; } } register the plugin using custom setting navigate to nue on salesforce > settings > custom settings, and search for lookup search plugin, and click ‘manage’ add a new lookup search plugin value, and enter the lookup field api name and object api name the plugin class name has to match the apex class name you created earlier
🤔
Have a question?
Get answers fast with Nue’s intelligent AI, expert support team, and a growing community of users - all here to help you succeed.
To ask a question or participate in discussions, you'll need to authenticate first.