Jay Sheth

Jay Sheth

Principal Consultant, Knowledge Services
Connect with me:

Author's Posts

How to update object CRUD permissions on multiple profiles on a single page/view

Jay Sheth

A very common business scenario, whenever we create a new Object in Salesforce, we also required to update the CRUD (Create, Read, Update, Delete) permissions for this new Object in multiple profiles, as this is one of the most important and crucial security requirement.

Another common scenario is when we have to grapple with understanding the as-is configuration for a specific standard or custom Object (or a set of Objects) for an existing org, where we need to get a birds-eye view of CRUD permissions given to all the profiles for these object/s.

This is usually a very time consuming process, particularly when there are many existing profiles in the Salesforce org. We are then having to go to each profile, go to the object CRUD settings for the object/s in question, and set the permissions as needed for each profile.

Most times we wish someone could build a page which would give us a view, and ideally an editable one, for seeing and setting object CRUD permissions for all the profiles at once.

But, there is an easy way out! Many of us are not aware of the very easy point-and-click customization to achieve this requirement.

Here are the simple steps (the snapshots assume a dummy custom object called Certification):

Read More
Topics: Best Practices, Learning, How To, Salesforce

Algorithm to convert 15-digit Salesforce record id to its 18-digit equivalent

Jay Sheth

All of us are aware that Salesforce record id's have 2 forms: 15-digit case sensitive id, and 18-digit case insensitive id. It is most important that we always use 18-digit id for all data manipulations, and not use the 15-digit one.

For facilitating this, Salesforce has already given an out-of-the-box formula function named CaseSafeID(id), which accepts the 15-digit id and returns the 18-digit equivalent.

Read More
Topics: Learning, How To, Salesforce

Salesforce Data Management - Choosing Record ID

Jay Sheth
Most of us working on Salesforce are aware of the 15 digit versus 18 digit record id story, it wouldn't harm to re-iterate as many have erred here in the past.

Basically it is much recommended to extract and play with 18 digit id (as opposed to 15 digit id) while manipulating data. This is because 18 digit id makes it case (capitalisation) safe. Using 15 digit ids has resulted in nightmares.

Consider for example a0H90000009sJaZ versus a0H90000009sJaz where the only difference is Z versus z (implying two totally different records). However, excel (vlookup etc.) will treat both as same and we are set for a disaster. This situation worsens as many a time we simply run a report (which always gives 15 digit ids), export it to excel, manipulate the excel and try to update/upsert it back, and get surprises due to capitalisation being ignored during manipulation itself. There are ways of telling excel to use capitalisation but that only leads to more complex formulae, and more training!

Earlier, the recommended approach was using the data loader for extract, as opposed to reports, as it extracts 18 digit ids. But that's little more time consuming (who doesn't love shortcuts?).

To help overcome this, Salesforce has introduced a function called CaseSafeID(id). This takes 15 digit ID and returns its 18 digit counterpart. We can simply create a (hidden) formula field called "Case Safe ID" and thereafter create any report also including this column. We can then use this column as the record id for all practical purposes (disregarding the 15-digit one) and we are good to go.

And life is suddenly safe, as CASESAFEID(a0H90000009sJaZ) = a0H90000009sJaZEAU, whereas CASESAFEID(a0H90000009sJaz) = a0H90000009sJazEAE. Excel does not get confused anymore!

So let's leverage CaseSafeID() and play safe!
Read More
Topics: Best Practices

About this blog

Our team's thoughts and insights on all things salesforce.com

Subscribe to Email Updates

Download User Story template