# Attachments

A multi-file upload block for Order Form headers. Validates file type, size, and count, uploads each file to NetSuite, and ties the resulting attachment IDs to the order so they're saved with the transaction.

## Available in

* Order Form modules **only**

## When to use

* Order Form pages where users need to attach supporting documents — purchase orders, receipts, signed forms, photos.
* Quotation flows where a customer's RFQ document gets attached to the quote.
* Returns workflows where users attach photos of damage.

For signature capture, use **Signature Pad** — it uses the same attachment store but is purpose-built for signatures. For uploaded files needing processing, use **File Processor**.

## Settings

| Setting   | Description                           |
| --------- | ------------------------------------- |
| **Title** | Heading text. Default: *Attachments*. |

The block has additional internal config defaults:

* **Allowed file types** — `.pdf, .doc, .docx, .jpg, .jpeg, .png, .txt`.
* **Max file size** — 10 MB per file.
* **Max files** — 5.

## How it works

1. User picks or drags files into the upload area.
2. Each file is validated against allowed types, max size, and max count.
3. Valid files are converted to base64 and uploaded via the NetSuite RPC `uploadAttachment`.
4. Files are stored at `/SuiteApps/com.in8sync2.brm/brm_restricted_temp/attachments`.
5. The resulting file IDs are written to `attachmentsData` in session state.
6. Filenames get prefixed with the BRM order ID for traceability.
7. On submission, the attachment IDs are linked to the transaction.
8. After successful submission, the block clears (`formResetAfterSubmission`).

Upload progress and error badges are shown inline. Only errors prevent the form from submitting.

{% hint style="info" %}
**Errors prevent submission, but warnings don't.** A file that's too large blocks submit. A successfully uploaded file with a non-blocking warning lets the order through.
{% endhint %}

## Examples

**Customer-supplied PO attachment.** Attachments block on a B2B order form. Customer attaches their own PO PDF; it ships with the sales order.

**Damage photos on returns.** Attachments on a returns workflow. Customer or staff uploads photos as evidence; attached to the return record.

**Signed agreement attachment.** Attachments alongside a Signature Pad — Signature Pad captures the signature, Attachments handles any supporting docs.

## Related

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Signature Pad</strong></td><td>For signature attachments.</td><td><a href="/pages/9pJ9kroHxLQmoXdCQM1t">/pages/9pJ9kroHxLQmoXdCQM1t</a></td></tr><tr><td><strong>File Processor</strong></td><td>For uploads that need custom processing.</td><td><a href="/pages/JB4kzXm5pNmn1AT0I1qG">/pages/JB4kzXm5pNmn1AT0I1qG</a></td></tr><tr><td><strong>CSV Import</strong></td><td>For importing line items from a CSV.</td><td><a href="/pages/3J3BhOMsnonrsRzcbDVt">/pages/3J3BhOMsnonrsRzcbDVt</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.in8sync.com/client-admin-guide/active-workflows/getting-started/transaction-components/attachments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
