Category: Custom Object

Truncate Custom Objects in Salesforce

Have you ever dealt with the requirement where you need to delete all records from a custom object? There are multiple ways to do that like – running anonymous scripts, running batch classes, deleting from Workbench, etc. But as you can understand all of these solutions either need some sort of custom coding to make sure you are not hit by the Governor limits of the platform.In this post, I am going to share the quickest and easiest solution to truncate any custom objects.Is it available in Classic and Lightning both?No, unfortunately, this option is only available in classic.What permission is required?You need “Customize Application” permission.How to enable this option?You need to first go to the Classic version of Salesforce. Then search for “User Interface” in the Quick Find search window. Then check the option “Enable Custom Object Truncate”.How to truncate the custom object?With the Custom Object Truncate option enabled, if you go to custom object definition, you will find the truncate button at the top. Clicking on that will ask you to enter the object name and then Salesforce will truncate the entire object. Isn’t it quick? No custom coding required and no need to worry about Salesforce’s Governor Limit.Anything you need to keep in mind?The truncate operation will fail if -There is any reference to other objects through lookup or master-detail relationships.The object is referenced in reporting...

Read More

Delegate Administrator

In a big organization, a single admin can a big problem in terms of bandwidth issues. Normally admins are getting multiple requests like – creating users, updating profiles, resetting the password, running report etc. along with their daily meetings. So it will be really difficult for a single admin to handle all these requests by himself/herself. And that is the place where admins want to delegate some of their work to others (trusted colleagues). But trust me, it is a big decision. You should not give all the admin privilege to your colleagues even though he/she is a very trusted employee. Rather you should delegate few specific task to your colleagues. In Salesforce, we can do the same with DELEGATE ADMINISTRATION. So basically Delegate Administrator will allow named users to manage other users within selected roles and profiles, as well as managed selected custom objects. With Delegate Administration, you can configure named users to do the below things -Role & Subordinate:  Delegate Administrator can create and edit users with specific roles and subordinates. The can’t modify the role hierarchy though.Profile:  Delegate Administrator can assign users(they create or edit) to assigned profiles. They can’t modify the profile.Permission Set: Delegate Administrator can add/remove selected permission sets from users(they create or edit) to assigned profiles. They can’t modify the permission set.Public Group: Delegate Administrator can add/remove selected public groups from users(they create or edit)...

Read More