Random Discovery – Record Type Fields in Formulas

If you’re like me, it’s sometimes easy to forget what options and services are available to you if you can’t see them. Case in point: being able to use Record Type fields in formulas.

This is a feature that was released only a year ago, but yesterday, I discovered that it’s not readily apparent EVERYwhere.

Here’s what the interface looks like when making a formula on a custom object:

CRRecordType

But here’s what it looks like when making a formula in Case:

caseNoRecordTypeName

Wait, what’s missing here? There’s no Record Type > ! And upon further research, I found it was not present in any of the Standard Objects I looked in: Cases, Accounts, Opps.

Does this mean that the functionality was not present in those Standard Objects? Breathe a sigh of relief, for the answer is, you CAN still use it. To test this, I manually typed in “RecordType.Name”, hit the Check Syntax button, and got the following result:

validatedRecordType

So there you have it. It WORKS, but it’s just not in the UI for Standard Objects. And frankly, it’s telling, regarding the overwhelming number of things we can do in Salesforce, the sheer scope of possibility, that only a year after release it’s so easy to forget that this feature was released.

Here are the values you can manually type into Standard Object formulas, validation rules, and workflow to reference Record Type information:

RecordType.Name
RecordType.NamespacePrefix
RecordType.Id (but avoid this one whenever possible!)
RecordType.DevName (I prefer using this one over RecordType.Name, because this is the API name and as a result, is in far less danger of being changed by a well-meaning admin.)

Advertisements

3 comments on “Random Discovery – Record Type Fields in Formulas

  1. Pingback: Getting Record Type IDs in Flow without Hardcoding | The Swamps of Salesforce-Dagobah

  2. Appreciating the time and energy you put into your blog and in depth information you provide. It’s good to come across a blog every once in a while that isn’t the same unwanted rehashed information. Excellent read! I’ve saved your site and I’m adding your RSS feeds to my Google account.

  3. you’re truly a just right webmaster. The site loading speed is incredible. It kind of feels that you are doing any distinctive trick. In addition, The contents are masterpiece. you’ve performed a magnificent task in this subject!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s