FormulaEval Namespace
The FormulaEval namespace provides classes and methods to evaluate dynamic formulas for SObjects and Apex objects. Use the methods to avoid unnecessary DML statements to recalculate formula field values or evaluate dynamic formula expressions.
When using a formula against an SObject or Apex object as the context object, the class methods or properties referenced by the formula must be global.
For usage notes, see Formula Evaluation in Apex.
The following are the classes and enums in the FormulaEval namespace.
-
Contains methods to build and validate user-defined formulas.
-
Specifies a global variable that references data in your organization in the
withGlobalVariables(formulaGlobals)method. -
Contains a method to evaluate the formula instance.
-
Specifies the return type for the
withReturnType(returnType)method.