How can we apply custom filters on Lookups in Freedom UI? I can see that there is some existence of a filtersConfig potential property for the object passed as the first parameter to executeRequest, but cannot find any examples or information on how this should be configured in Academy or on other Community questions. We are trying to use this to associate records to a parent record using the + button on a Freedom UI "detail" list, but we don't want any records already associated with any parent by foreign key to be eligible for association using the lookup, and also have some other conditions to apply based on the child entity. Our environment is currently on 8.1 Quantum.
Here is the relevant excerpt from the handler on our form page, without any filters applied and with the non-relevant logic applied in the afterClosed area removed for brevity:
request.$context.executeRequest({
type: "crt.OpenLookupPageRequest",
$context: request.$context,
entitySchemaName: "Order",
caption: "Select Quotes to associate with the Lead",
features: {
select: {
multiple: true,
selectAll: false,
resultType: 'lookupValues'
},
create: {
enabled: false
}
},
afterClosed: async function(selectedItems) {
// logic here
return next?.handle(request)
}
});