function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Natraj Subramani 15Natraj Subramani 15 

Lookup Filter in Visualforce page Not Working

Hi All,

I have view/new Visualforce pages built on standard object Case. I have another custom field called "Parent Case" which is a look up to Case object.

I have added look up filters Parent Case field to display only certain record type and status = closed.

For some reasons the look up filter is not working at all. Not sure if I am missing something.

Please advise how to get look up filters working on VF pages.

Thanks
Natraj
Dushyant SonwarDushyant Sonwar
Hi Natraj ,

Apex:inputField supports lookup filters . Is your lookup purely custom or you are using apex:inputField? 
Could you double check that you see the below icon in front of the lookup field schema design?
User-added image
Natraj Subramani 15Natraj Subramani 15
Hi Dushyant,

Thanks much for the reply, yes I am using inputfield only. I created a new look up field called Parent Case under the Case object (Its bascialy self look up). I added custom filter on the Parent Case field to include only closed cases & certain record types.

<apex:inputField label="Parent Case: " value="{!Case.Parent_Case__c}" rendered="{!If(parentCase == 'Show', true, false) }" style="width:350px" />

User-added image
The look also has the image you mentioned. Screen shot attached for reference.

Please let me know if I am missing something ?

Thanks
Natraj