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
Andrew BudziszekAndrew Budziszek 

Block users from creating Objects?

How can I block certain users(based on a condition) from creating certain objects? 

Ex. Block users who can create contacts from creating provider contacts.
Best Answer chosen by Andrew Budziszek
Cloud ArchitectCloud Architect
Andrew are you talking about record creation or Object Creation?

If you are talking about record creation and permissions of creating record.

1) Create 2 profiles and give the permissions at the object that is desired and assign it to relevant users.



Thanks

All Answers

Cloud ArchitectCloud Architect
Andrew are you talking about record creation or Object Creation?

If you are talking about record creation and permissions of creating record.

1) Create 2 profiles and give the permissions at the object that is desired and assign it to relevant users.



Thanks
This was selected as the best answer
Andrew BudziszekAndrew Budziszek
Yes! I guess a better way to phrase it would've been - If a user has create permissions on Object A, how can we prevent them from creating certain record types of Object A. 

Thanks
David ZhuDavid Zhu
You can use validation rule to prevent user from creating record. In your case, in the validation rule, check profile (or name) of the user and the record type.
James LoghryJames Loghry
For record types, I'd recommend using either profiles or permission sets to enable record types for your particular users.  If that's not "specialized" enough for your use case, then perhaps look at using validation rules, flow, or triggers in that order.