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
sakthivelsakthivel 

Custom Object Records - Delete permission only for system administrator

i have a custom object which is child(B) of master object (A)

 

The delete button  should be visible to only sys admins for Object B(child), any solution ? 

Deepak Kumar ShyoranDeepak Kumar Shyoran

Hi sakthivel,

 

For such type of setting you need to maintain the user profile and user permission setting.Hopefully these two things solve your problem.

 

Don't forget to give Kudos if this post helped you.

Mark my answer as a solution to your question if it solve your problem.

 

 

Best Regards,

Choudhary Deepak Shyoran

Salesforce Developer

AroraAnupAroraAnup

Well, if the requirement is just to remove the DELETE button from records in Object B, that can pretty much be done using profile permissions for this object. However, since Object A is the master, records in Object B will still get deleted is the user deletes the master record from Object (coz of the master-detail relationship nature)

So, if a user has delete permissions on object A and not on object B, and if the deletes records in object A, the related records in object B will still get deleted.

Do share some more details so that I can diagnose further!

sakthivelsakthivel

Thanks for the responses,

 

Its clear that we need to modify profile settings to revoke delete permission on object B(child) and i'm aware that once master record is deleted related child will get deleted,

 

I want to restrict only on child, no need to worry about master.

 

As of my knowledge we cannot modify standard profiles and standard profiles doesn't get access to custom access by default. so we should care about only custom profiles ?

 

Do i need to modify all profiles one by one ?

 

 

Deepak Kumar ShyoranDeepak Kumar Shyoran

Don't forget to give Kudos if this post helped you.

Mark my answer as a solution to your question if it solve your problem.

 

 

Best Regards,

Choudhary Deepak Shyoran

Salesforce Developer

AroraAnupAroraAnup

You are right that you cannot modify the standard profiles. As a best practice, it is always recommended to create custom profiles, by cloning the standard ones, so that you can always modify the permissions that you want, as per the security requirements.

In this case, if you have multiple profiles where the DELETE permissions needs to be revoked from this custom object, you would need to clone those profiles and create custom ones (if not done already) and then remove the DELETE permission from this custom object. Once done, you can then assign this custom profile/s to the relevant users.

Hope this helps!

sakthivelsakthivel

Exactly what i thought , i need to modify all custom profiles those who have access to that custom objects.

 

Thanks for the help :)