2

How can i use dynamic field value in the formula field. Like :- TEXT(contact__r.Contact_Title__c)

I want to deploy this formula field in my org without creating Contact_Title__c field on contact object. It is showing me the error Contact_Title__c field is not present on contact. How can i use this field dynamically inside the formula.?

2 Answers 2

1

Formula fields can only refer following types of fields

  1. Custom and standard fields on the object
  2. Related lookups utpo 4 levels
  3. Global variables like User, UserRole, custom Settings etc.

To answer your question, dynamic formulas are not possible.

More Details on Global Variables https://help.salesforce.com/apex/HTViewHelpDoc?id=dev_understanding_global_variables.htm&language=en

0

Update: the following applies only to the visualforce pages, not formulas, my fault ;(

You can use a dynamic reference to the objects field like this:

TEXT(contact__r["Contact_Title__c"])

Dynamic Bindings

3
  • This is not working. I tried to create following formula field for contact -> ''+Account["id"]. This is throwing error as "Found Account Commented Dec 8, 2015 at 13:09
  • I created formula field using your reference but it thew an error:-
    – RaviKant
    Commented Dec 8, 2015 at 13:53
  • [19:20:54] Abhinav Bhatia: Error: Invalid Data. Review all error messages below to correct your data. Syntax error. Found 'Payee__r' (Related field: Formula) [19:21:00] Abhinav Bhatia: TEXT(Payee__r["Contact_Title__c"])
    – RaviKant
    Commented Dec 8, 2015 at 13:53

You must log in to answer this question.

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