• Hesham Ahmed
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,
I have an junction object with three lookup fields to three budget types (other objects). They are filled in depended on selected record type.
As result of formula I want to have 18 character Id.
Formula:
CASE(RecordType.Name,
'Product Budget', EMS_Product_Budget_gne__r.Id,
'Region Budget', EMS_Region_Budget_gne__r.Id,
EMS_Territory_Budget_gne__r.Id)

Compiled size: 523 characters. Great but it returns 15char Id. Lets use CASESAFEID()
CASESAFEID( CASE(RecordType.Name,
'Product Budget Allocation', EMS_Product_Budget_gne__r.Id,
'Region Budget Allocation', EMS_Region_Budget_gne__r.Id,
EMS_Territory_Budget_gne__r.Id) )

Error: Compiled formula is too big to execute (9,780 characters). Maximum size is 5,000 characters.
CASE(RecordType.Name,
'Product Budget Allocation', CASESAFEID( EMS_Product_Budget_gne__r.Id),
'Region Budget Allocation', CASESAFEID( EMS_Region_Budget_gne__r.Id),
CASESAFEID( EMS_Territory_Budget_gne__r.Id) )

Error: Compiled formula is too big to execute (8,374 characters). Maximum size is 5,000 characters

Why is it that expensive? Is there a way to wokaround this?