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
rpmcguirerpmcguire 

How to filter a Related List

Trying to created a filtered view of the Contacts on an Account, so that different SF users see different sets of Contacts when they view an Account record.

Details: we might have 100+ contacts on an account... the great majority of them are users of our software and a handful are the decision makers and buyers of our software. The sales team wants to see only the decision makers, and the support team needs to see all of the users (since they support them).

My thought was to add a flag to the Contact record to designate the system users, then create an S-Control and hook it up to a custom button to "Show Sales Contacts Only" (button would display all Contacts on this Account where the user flag = false).

Does anybody have any cleaner ways to do this, or at least some template code I could use for the control? Thanks in advance!

Rich
jpizzalajpizzala
Is this record access requirement only for related lists or will it apply across your entire org?

If it applies across the entire org and (for instance) the sales team should only have access to decision maker Contact records regardless of where they are within the Salesforce interface, you may want to consider enforcing this through Salesforce's security model (org-wide defaults, sharing settings, role hierarchy, etc.).
rpmcguirerpmcguire
This post was specific to Related Lists, but we can use this same functionality in other places. I've considered implementing this via security, but I don't think that will give us the flexibility we need, since in some cases the sales reps will want to see the entire list of contacts for an account. Thanks!