Workflow

How to Edit a Sales Invoice Attachment

Verified end to end. Demo run sales-invoice-edit-attachment-20260519T221820Z uploaded a disposable attachment to saved invoice FT 9999/1699, opened the row edit modal, changed the description and public flag, verified the updated row, and deleted the file.

Evidence Summary

Source invoice
999901699 / FT 9999/1699
Customer
910 / 100 Ouvidos Lda
Route
/vendas/ft/view/OTk5OTAxNjk5
Evidence file
raw/playwright/workflows/latest-sales-invoice-edit-attachment.json

Verified sales invoice attachment edit workflow

When to Use This

Use this when an invoice attachment is already listed on the saved FT view and you need to correct its description, assign or clear a category, or change whether the attachment is public. This edits attachment metadata only; it does not replace the uploaded file. To replace the file, delete the attachment and upload a new one.

Step-by-Step

  1. Open the saved sales invoice view. The verified run used /vendas/ft/view/OTk5OTAxNjk5.
  2. Open the Attachements tab.
  3. Find the attachment row by description or file name.
  4. Click the row's Edit action.
  5. In the Edit modal, change Description. This field is required.
  6. Optionally choose or clear Category.
  7. Check or uncheck Public depending on whether the attachment should be exposed as public metadata.
  8. Click Save.
  9. Confirm the attachment table reloads and shows the edited description and public state.

Verified Behavior

CheckObserved result
Edit modalThe row edit action opened modal #editattachment with title Edit.
Loaded fieldsThe modal loaded hidden attachment id #attach_id, required description #edit_attach_assunto, category selector #edit_attach_categoria, and public checkbox #edit_attach_public.
Save actionClicking Save called editAttachment and returned {"success":true}.
Description editThe verified row changed from AI FT attachment before edit 20260519T221820Z to AI FT attachment edited 20260519T221820Z.
Public flag editThe verified run unchecked Public; the next DT_Select_Attachments row returned public=0.
CleanupThe disposable attachment was deleted after verification; the final lookup found zero rows for that attachment id.
Safety boundaryNo invoice save, payment, print, communication, stock, or line-edit request was submitted.

Backend Calls Observed

Action or endpointPurpose
loadAttachLoads the selected attachment metadata into the edit modal.
editAttachmentSaves serialized metadata values such as num, assunto, categoria, and the optional public flag.
DT_Select_AttachmentsReloads the saved FT attachment table using search[NumDoc]=999901699 and search[tipodoc]=FT.
deleteAttachmentByIdCleanup endpoint used after the verified edit so the demo invoice was left without the disposable attachment.

Raw evidence: raw/playwright/workflows/sales-invoice-edit-attachment-20260519T221820Z.json. Screenshots: assets/screenshots/sales-invoice-edit-attachment-20260519T221820Z-01-attachments-tab.png through assets/screenshots/sales-invoice-edit-attachment-20260519T221820Z-05-after-delete.png.