---
description: >-
  Returns the id of an attachment of the current record by looking for the given
  file name.
---

# getAttachmentId

## Parameters

fileName - the name of the file

## Example Usages

```javascript
app.getAttachmentId("Invoice1.pdf");
```

### Return Values

Function returns the ID of a specific attachment based on its **fileName** for the current record, or it returns null if no matching attachment is found or if the **fileName** parameter is not provided.
