---
title: "Export custom fields"
canonical: "https://support.appfire.com/space/PSJ/806062425/Export%20custom%20fields"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)



> Macro (excerpt)
> 
> Export a CSV formatted list of all custom field names and IDs.

```
string csv = "Name,ID\n";
runnerLog("Name, ID");

for(JCustomField cf in getAllCustomFields()) {
    string temp = cf.name + "," + cf.id;
    runnerLog(temp);
    csv += temp + "\n";
}

printInFile("customFieldList.csv", csv);
```