---
title: "getContextsForCustomField"
canonical: "https://support.appfire.com/space/PSJ/1341981402/getContextsForCustomField"
format: markdown
---
> Macro (aura-html)


 


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getContextsForCustomField(customfieldId) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Returns the list of contexts (their names) for a certain custom field

Returns the list of contexts for a certain custom field

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| customfieldId | String | Yes | The id of the custom field (format: customfield_xxxxx) |

## Return Type

**String []**

## Example

```javascript
getContextsForCustomField("customfield_10041")
```

Default Configuration Scheme for cb cf|ctx1|ctx2

## See also

> Macro (contentbylabel)