---
schema_version: "1"
id: c26684c5d2888aebcb1f4a631f0faa54599512712951d6eac026349acaf0ddf8
title: FormulaFunction
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_formulafunction.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_formulafunction.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 83991b9c2f93e5ee759ec16d8a01cab1c8a253bf8864a5cfda2961c766e07884
description: Represents a function used when building a formula, including examples and uses. This object is available in Tooling API version 39.0 and later.
---
# FormulaFunction

Represents a function used when building a formula, including examples and uses. This object is available in Tooling API version 39.0 and later.

## Supported SOAP Calls

describeSObjects(), query()

## Supported REST HTTP Methods

GET

## Special Access Rules

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

## Fields

| Field | Details |
| --- | --- |
| Category | 
Type

[FormulaFunctionCategory](#formulafunctioncategorydef)

Properties

Filter, Group, Nillable, Sort

Description

TheFormulaFunctionCategory to which the formula belongs.



 |
| CategoryId | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The ID of the FormulaFunctionCategory.



 |
| Description | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Description of the formula function.



 |
| 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.



 |
| ExampleString | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

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



 |
| IsAllowedInEntityContext | 

Type

boolean

Properties

Filter, Group, Nillable, Sort

Description

Removed. Indicates whether you can use the formula function on an Entity (true) or not (false). For example, you can’t use the PRIORVALUE function in a custom Account formula field. This field is available in API versions 39.0 to 47.0. Use the [FormulaFunctionAllowedType](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_formulafunctionallowedtype.htm "Represents the functions that are supported in the given formula context. Available in API version 48.0 and later.") object in API version 48.0 and later.



 |
| IsAllowedInFlowContext | 

Type

boolean

Properties

Filter, Group, Nillable, Sort

Description

Removed. Indicates whether the formula function is allowed in a Flow (true) or not (false). This field is available in API versions 39.0 to 47.0. Use the [FormulaFunctionAllowedType](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_formulafunctionallowedtype.htm "Represents the functions that are supported in the given formula context. Available in API version 48.0 and later.") object instead in API version 48.0 and later.



 |
| IsAllowedInVisualforceContext | 

Type

boolean

Properties

Filter, Group, Nillable, Sort

Description

Removed. Indicates whether the formula function is allowed in Visualforce (true) or not (false). This field is available in API versions 39.0 to 47.0. Use the [FormulaFunctionAllowedType](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_formulafunctionallowedtype.htm "Represents the functions that are supported in the given formula context. Available in API version 48.0 and later.") object instead in API version 48.0 and later.



 |
| Label | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The formula function label that appears in the user interface.



 |
| Name | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The name of the formula function.



 |
| Types | 

Type

QueryResult

Properties

Filter, Group, Nillable, RestrictedPicklist, Sort

Description

Allowed formula types for functions.

This field is available in Tooling API version 48.0 and later. |

## FormulaFunctionCategory

| Field Name | Details |
| --- | --- |
| 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](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_queryresult.htm "Represents the results of a query. For example, if you query on the object EntityDefinition, all the layouts for that entity are returned as an array of QueryResult objects in the Layouts field. Available in Tooling API version 34.0 and later.")

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:

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

To get the DurableID of a function category using SOQL:

SELECT DurableID FROM FormulaFunctionCategory

To get all the categories and their functions using SOQL:

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