[SalesForce] Apply filter for lookup on custom page

I need to customize lookup for custom object (fetch records applying some filter) on custom page.

What we have.

  1. Object ClientItem that contains object Operator. [ClientItem.Operator]

  2. Controller

     global with sharing class XCtrl {
        public Client_Item__c clientItem {get; set;}
  3. Page

    < apex:page controller="XCtrl">< apex:form >
         < apex:inputField id="operatorText" required="false" value={!clientItem.Operator__c}" onchange="..."/>
     < /apex:form >< /apex:page >

So, i have lookup for input field. Is it possible to apply filter for it (fetch data with some criterias)

Best Answer

You can create your own custom lookup and can show records in custom lookup window as per your need or can create lookup filters at object level and can use that lookup on your custom page to show filtered records.

Related Topic