Administration
Salesforce Formula Fields Interview Questions and Answers Experienced
1. What is a formula field.
Ans:
Salesforce Formula Field is a read-only field that derives its value from a formula expression you define.
The formula field is updated when any of the source fields change.
2. Governor Limitations of a Formula Field
Ans:
A] Max 3,900 characters in the formula expression.
B] 25 Formula Field per Object.
C] In Cross Formula field, Up to 10 relationships can be traversed.
3. What is a Cross Formula Field.
Ans:
A Cross-Object Formula Field is a read-only formula field that pulls data from a related object (Parent) in the Child.
Example: On the Contact object, you want to display the Account Industry.
4. If I want to show Parent field in the Child record using Cross Formula field. Then what the Parent Traverse Depth Limit.
Ans: 10
5. Can we show parent's field over the child.
Ans: Yes.
6. Can we show child's field over parent
Ans: No.
Solution:
A] Roll-Up Summary Field (Only for Master-Detail relationships).
B] Record Triggered Flow (C-P).
C] Apex Trigger
7. Can we use Cross Formula field in the case of Lookup relationship.
Ans: Yes.
8. Can we use Cross Formula field in the case of Master-Details relationship.
Ans: Yes.
9. Calculate Age in the Contact record.
b>Ans: (TODAY() - Birthdate) / 365
10. Create a formula field “Eligible for Voting” (Checkbox) on Contact, if age is greater or equals to 18 then Check it. Else Un-Check the Checkbox.
Ans: Create a formula field with return type as 'Checkbox'.
IF(Age__c >= 18, TRUE, FALSE)
Another Solution
Age__c >= 18
11. Create a Formula Field “Contact Type” over Contact object. If Age >= 18, then Print “Major”, Else “Minor”.
Ans: Create a formula field with return type as 'Text'.
IF(Age__c >= 18, "Major", "Minor")
12. Create a Formula Field “Eligibility” on Contact. Show "Yes Logo" and "No Logo" as per Eligibility (Age). Yes logo for Age>=18, else No Logo
Ans: First download images from google and upload in the document object (Salesforce Classic option you can select).
Right click on the image and copy image url.
IF( Age__c >=18 ,
IMAGE('https://starhealthinsurance-c-dev-ed.develop.file.force.com/servlet/servlet.ImageServer?id=0155j0000038mVD&oid=00D5j00000DQ0LC&lastMod=1697768176000','Any Name',30,30) ,
IMAGE('https://starhealthinsurance-c-dev-ed.develop.file.force.com/servlet/servlet.ImageServer?id=0155j0000038mVI&oid=00D5j00000DQ0LC&lastMod=1697768297000','Any Name',30,30 )
)
13. Display Gender Logo according to Gender(Male, Female, Transgender) on the Contact.
Ans: NOTE – First, download all the images and upload these images in the Salesforce Document Object.
Right click on the image and copy image url.
CASE( Gender__c , 'Male', IMAGE('https://starhealthinsurance-c-dev-ed.develop.file.force.com/servlet/servlet.ImageServer?id=0155j0000038mVN&oid=00D5j00000DQ0LC&lastMod=1697768955000', 'Male Logo',30,30
)
, 'Female', IMAGE('https://starhealthinsurance-c-dev-ed.develop.file.force.com/servlet/servlet.ImageServer?id=0155j0000038mVS&oid=00D5j00000DQ0LC&lastMod=1697768995000','Female Logo',30,30
)
, 'Transgender' , IMAGE('https://starhealthinsurance-c-dev-ed.develop.file.force.com/servlet/servlet.ImageServer?id=0155j0000038mVX&oid=00D5j00000DQ0LC&lastMod=1697769019000','Transgender Logo',30,30
)
, ' ')
14. Create a Formula Field to show Time 05 Minutes After the Record Creation Time.
For Example: Record Create Date Time is 19/12/2025, 6:30 PM, then 5 Min after will be 19/12/2025, 6:35 PM
CreatedDate + 0.00345
For More info