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

auto populate record

I have a requirement where a lookup field needs to either be autopopulated with a particular record or when I click the magnifying icon to only show that particular record so I can't choose anything else. How can I do this?


Auto populating can be achieved using VF page and controller.


To show only particular record when you click on lookup icon, you need to use lookup filters. Is there any other field based on which you want to filter the data shown in lookup? For eg: If Country__c, State__c are 2 lookups, then based on Country name you need to display states then you use lookup filters. In the criteria: Country:Name equals Field State:Country:Name.


Does this help you?