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
vijay k 8vijay k 8 

regarding account and contact

Hi all,
         In account object i have a status field (active and inactive),when ever we want to insert a contact to particular accountname in lookup it will show only active accounts.how can be it done,is there any option in UI.thanks in advance

Regards
Vijay
Best Answer chosen by vijay k 8
BALAJI CHBALAJI CH
Hi Vijay.

Please follow below steps to achieve this requirement.
  1. Go to Contact Fields.
  2. Edit the Standard Field - Account Name.
  3. Click on "Show Filter Settings".
  4. Give a Filter Criteria as per your requirement. Example: In "Field" select your Status Field and Select "equals" in "Operator" and give your value in last box i.e., "Active" as per your requirement.
  5. Make sure you enable this filter.
Please find attached Screeshot of same.
User-added image
Let us know if that helps you.

Best Regards,
BALAJI

All Answers

William Christ NYWilliam Christ NY
Add a Lookup Filter to the "Account Name" standard field in the Contact object.  In Setup, go to the Contact object's fields, click "Account Name", then click "Edit".  Click "Show Filter Settings".  For the Filter Criteria, enter your status field in the "Field" box, "equals" in the Operator box and "Active" in the last box (or whatever value indicates the active status).  That should limit the lookup to only those accounts that match your lookup criteria.
BALAJI CHBALAJI CH
Hi Vijay.

Please follow below steps to achieve this requirement.
  1. Go to Contact Fields.
  2. Edit the Standard Field - Account Name.
  3. Click on "Show Filter Settings".
  4. Give a Filter Criteria as per your requirement. Example: In "Field" select your Status Field and Select "equals" in "Operator" and give your value in last box i.e., "Active" as per your requirement.
  5. Make sure you enable this filter.
Please find attached Screeshot of same.
User-added image
Let us know if that helps you.

Best Regards,
BALAJI
This was selected as the best answer