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
Ravi Kumar 259Ravi Kumar 259 

filter the A object records

Hi experts,

I have a two objects there are A and B, both are related two each other(Lookup Relation).and I create lookup field in B object, when I can click on lookup icon button in B object , it will show 10 record of A object,I have a requement here, lookup field only allow  4 records out of 10 records.

give me sample code..!
SonamSonam (Salesforce Developers) 
Do you have a criteria for selecting these 4 records in the lookup - if yes, you can directly set the lookup filtr to save coding.