---
title: "getCustomFieldIdByName"
canonical: "https://support.appfire.com/space/PSJC/1624965365/getCustomFieldIdByName"
format: markdown
---
> Macro (aura-html)

  

## Description

> Macro (excerpt)
> 
> Returns a list of ids for all custom fields with the given name.

Returns a list of ids for all custom fields with the given name.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getCustomFieldIdByName(customfieldName); | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| customfieldName | String | Yes | Name of custom field to retrieve ids for. |

## Return Type

**String []**

Returns an array of custom field ids.

## Examples

### Example

```javascript
return getCustomFieldIdByName("My Custom Field");
```

Returns: "customfield_10101"

## See also

> Macro (contentbylabel)