Formulas | Troubleshooting
A long error message is received from the system, rather than the validation error message when the validation is not met
Review the validation rule. Make sure the validation rule is not checking a field that does not have a value until after the record is created.
To prevent the error, add an OR
condition to the validation rule, so that the fields are only checked if the record is not new—only when updated, not when created.
"You have reached the maximum number of 15 object references on [Object name]..." error
Error message: "You have reached the maximum number of 15 object references on [Object name]. You must remove at least 1 relationship(s) in order to save this [Workflow Rule/formula field/..]."
Objects in Salesforce orgs have a limit of 15 spanning relationship, which are references to other objects. If you get the error, find ways to reduce or remove spanning relationships from the formula.
For more information, see the Salesforce Help Article: Error 'Maximum of 15 object references on Object Name. You must remove at least 1 relationships' when you create a formula
Syntax Error states that it expected an output type but received a different output type
See common causes of syntax errors.
Syntax Error states "Error: Syntax error. Missing ')'"
See common causes of syntax errors.
Syntax Error states "Error: Field #### does not exist. Check spelling."
See common causes of syntax errors.
Syntax Error states that the compiled formula is too big or refers to a character limit
See more information about limits.
If after saving your formula displays “#Error!” or “#Too Big!”
See Salesforce help article Common Formula Errors for troubleshooting tips.
If when editing you get the following message: Attempt to dereference a null object
Typical causes of "Attempt to dereference a null object" are related to null or 0 values in the data, or to permission sets. See more information about blank field handling.
"...Division undefined: (System Code) External entry point" error
When trying to save a record you get an error message such as:
"The formula in the “SomeWorkflowOrValidationOrFomulaField” rule or process is invalid due to the following: Division undefined: (System Code) External entry point"
This error is typically related to null or 0 values in the data. See more information about blank field handling.
When copying and pasting a formula, speech marks are not recognized
Enter the quotation marks directly in the formula window into which you have pasted.
When testing email formulas in a trial org, after several tests you stop receiving emails
You may have exceeded the org's daily email limit. Try another trial org.
Email template formulas are not presenting correctly
It is often quicker to create a formula field on the object to pull in rather than troubleshoot email template formulas, which can end up taking a lot of time.
- This is particularly true when trying to combine multiple formula functions, for example BLANKVALUE and reformatting a date; try creating a formatted date field on the object instead to reduce the complexity of the formula required in the email template.
Review the formula and consider moving the formula to a formula field. For more information see Formulas in email templates.