4

Does anyone know a workaround of the 5000 character limit on a formula field without having to create a trigger?

I am trying to get the country ISO codes using a case statement but I'm hitting the 5000 character limit. I could quickly write a trigger and utilize custom settings for this but I don't know if there a quick hack I could utilize.

2
  • 1
    Not that I know of, even if you miss the bullet today you will end up dead sooner or later when there is more to add.
    – Rao
    Commented Feb 28, 2014 at 21:27
  • 1
    Note you can get ISO Country codes for free if you use the optional State and Country picklists - e.g. for Leads and Accounts;
    – cropredy
    Commented Mar 1, 2014 at 2:36

2 Answers 2

2

Instead of using a formula field, you can switch to a workflow and field update, which is not subject to this same 5,000 character limit.

4
  • 1
    Oh nice, awesome! I think this will work. What's the character limit to the formula on a field update?
    – Kenn K
    Commented Feb 28, 2014 at 21:48
  • I'm not sure, this site claims "The formula field for Field Updates has a much larger limit. There is actually no documentation on what the limit is.".
    – Phil Rymek
    Commented Feb 28, 2014 at 22:07
  • Current character limit on formula for workflow is 3900
    – jaw999
    Commented Nov 18, 2014 at 22:03
  • The code in a Formula Field can exceed the maximum number of characters allowed in two ways: Directly in the Formula Field's characters (3900). In the overall size of the Formula after other included Formula Fields are factored in (5000) bytes. help.salesforce.com/… Commented Jun 2, 2021 at 17:26
0

I recently published an app named Unleash Your Formula. https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MS8T1EAL

The app does something simple, it copies and syncs formula fields to the specified non-formula field (of the same type). This is an effective way to handle character limits.

Most character limit issues arise because the formula is referencing another formula, often multiple times, and each additional reference increases the formula character size by the size of referenced formula field.

With this app, you can reference instead the mapped non formula field, which will quickly reduces the character limit.

Even if you indeed have 5000 characters in a single formula, you can split it up into multiple formulas and use the same trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .