FormulaFunction

Represents a function used when building a formula, including examples and uses.

Version 

Introduced in API version 39.0.

Supported SOAP API Calls 

describeSObjects(), query()

Supported REST API Methods 

Query

Special Access Rules 

  • In API version 45.0 and later, only users with the ViewSetup and Configuration permission can access FormulaFunction or FormulaFunctionCategory.

Fields 

CategoryId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The ID of the FormulaFunctionCategory.

Description 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Description of the formula function.

DurableId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Unique identifier for the field. Always retrieve this value before using it, as the value isn’t guaranteed to stay the same from one release to the next. To simplify queries, use this field.

ExampleString 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Describes the function and what arguments you can use with it.

Label 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Label of the FormulaFunctionCategory that appears in the user interface.

Name 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Name of the FormulaFunctionCategory.

FormulaFunctionCategory 

Field NameDetails
DurableId- Type: string - Properties: Filter, Group, Nillable, Sort - Description: Unique identifier for the field. Always retrieve this value before using it, as the value isn’t guaranteed to stay the same from one release to the next. To simplify queries, use this field.
Functions- Type: QueryResult - Properties: Filter, Group, Nillable, Sort - Description: A list of functions that belong to the FormulaFunctionCategory.
Label- Type: string - Properties: Filter, Group, Nillable, Sort - Description: Label of the FormulaFunctionCategory that appears in the user interface.
Name- Type: string - Properties: Filter, Group, Nillable, Sort - Description: Name of the FormulaFunctionCategory.

Query Examples 

To get all the functions in FormulaFunction using REST:

1req.setEndpoint('http://instance.salesforce.com/services/data/v68.0/tooling/query?q=SELECT+label+FROM+FormulaFunction );
2req.setMethod('GET');

To get the DurableID of a function category using SOQL:

1SELECT DurableID FROM FormulaFunctionCategory

To get all the categories and their functions using SOQL:

1SELECT Name, Label, (SELECT Name, Label, Description, ExampleString FROM Functions) FROM FormulaFunctionCategory