Skip to main content
I'm not the best when it comes to formulas so I am hoping to get some help!

 

We have a custom object that requires a formula field. The field is going to be called Billing Code. This will pull from a related record called Access Code. However, under certain circumstances, this formula should pull from one of two Access Code lookup fields.

 

On Record Type A, we want the Billing Code field to display the value from Access Code 1. On Record Type B, we want the Billing Code field to display the vaue from Access Code 2.

 

I can do this with multiple fields, but that would require two different email templates as well and I would like to prevent that.

 

Can I create a dynaic IF statement that will pull the code from the correct access code based on the record type of the custom object?
7 respuestas
  1. 27 mar 2015, 17:45
    +1 Jim,

     

    I like using RecordType.DeveloperName but the same idea

    CASE( RecordType.DeveloperName ,

    "Advertiser", Field_1__c,

    "Agency", Field_2__c ,

    "Who knows what else you want this to say, this is just the catch-all"

    )

     

     
0/9000