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
SS_SFSS_SF 

How to prevent user create new list view

How can I prevent user to create new list view ( Lead view )  , I have no set authorize for "Manage Public List Views" on user profile

Please suggest me what I can do that

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

You can't prevent users from creating private list views. That being said, you must make a consious effort to make sure users can't access records by configuring your organization's Sharing Settings.

All Answers

sfdcfoxsfdcfox

You can't prevent users from creating private list views. That being said, you must make a consious effort to make sure users can't access records by configuring your organization's Sharing Settings.

This was selected as the best answer
Jessica LandismanJessica Landisman

What if I want to prevent certain users from view particular data fields (e.g. contact address) in a record if they are not the contact owner and have a particular role.

 

I do want to allow these same users to view/edit contact address for contacts they own. Field-level crud (making the field hidden for a particular profile) hides the field in all scenarios, which is too restrictive.

stunaitestunaite

Hi,

 

Well, there is always a way, but it needs some development:

 

Y can create a javascript embeded in a home component which is always checking the generated whole page. When it catches a user in a list view, just delete the DOM Element which label is "create new view".

 

Good luck!

sfdcfoxsfdcfox
Arguably, your point is invalid. Client-based security is pointless. What's to stop me from writing a GreaseMonkey script that blocks your attempt to block my attempt to create a list view? Better, I can use something like an "ad blocker" extension to stop your script from loading entirely. Worst case, I can just turn off JavaScript, click Create New View (thus negating your script), and then turning it back on.

You might stop a novice from creating a list view, but you'll also be ignoring the larger problem: they can still access all records they are shared with. List views are a convenience for users that shouldn't be taken away from them. Spending any time developing a "solution" to block the creation of list views rather than focusing on sharing settings is definitely not the way to go.