+ Start a Discussion

Filter Contacts in lookup

I created a custom lookup on Contacts table, I need to see only contacts that belong to "x" contact r\ole when I hit the search/lookup.  Is it possible to filter contacts as per my requirement?
Also I need to lock the Custom Lookup field once the contact is`selected...  Please advice
No, and Yes... to an extent.

You can't filter lookup dialogs with the current release, but know that you're not alone...

In the current release, you can either write a validation rule to enforce that the lookup field is read-only once a value is in place (And(Not(PriorValue(Contact__c)=""),IsChanged(Contact__c))), or you can use record types (if you're in a profile-enabled organization) to lock the field to all but admins after the initial edit (or Apex Triggers, but that's a bit overkill).

~ sfdcfox ~