Quotes: settings, costing and lookups
Save quote notes
/a/Quote_setNotes
Replace the quote’s ordinary notes column.
When to use this endpoint
Use for the legacy Notes/Fields dialog. This is not form answers, metadata tags or a merged note-history operation.
Authentication and permissions
Authenticates a signed API key or CRM session as its tenant user. Requires Quotes View (pageQuotes_view). Non-admin users blocked by legacy crm_access bit 32 are denied. Roleless non-admin users fail closed. Also requires Quotes Edit (pageQuotes_edit); client administrators inherit page permissions.
Uses local tenant IDs. The active quote must also satisfy the account’s customer department/account-manager visibility filters for non-admin users, including signed-key requests.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible quote ID | Yes | Positive local quote ID, integer-converted; an active quote is required. |
notes | String | Yes | Non-null text (not val). Empty clears; no trimming, HTML escaping or structured-note validation. |
Example request
$result = FM_api('Quote_setNotes', ['id'=>'1042','notes'=>'Price valid for 30 days.']);
Example response
{"ok":1}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"quote does not exist"} | The active quote is missing (lookup failures are reported separately). |
{"error":"Unable to save quote. Check the saved state before retrying."} | Database, audit, transaction or commit acknowledgement failed. Refresh saved state before retrying an uncertain commit. |
{"error":"permission denied"} | Required Quotes permission is absent or the non-admin actor is blocked by legacy access settings. |
{"error":"missing or invalid parameter: id"} | Missing/nonpositive quote ID. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Replaces the notes column as supplied; empty text clears it. An identical value returns warning=no change needed.
- No note JSON parsing, mention delivery, HTML transformation or notification dispatch is performed here. The mapped CRM2 editor has different follow-ups.
- Locks the active quote in a tenant transaction. Bound writes, last_edited (server-local date/time), quote history and quotes cache invalidation are checked together. Audit or primary write failure rolls back. Existing caller transactions retain a savepoint; an uncertain commit returns an error and is never replayed automatically.
- No direct mobile app/m-service caller for this RPC was found.
Side effects
- Updates the named data and last_edited, records quote history and requests quotes cache invalidation in the tenant transaction. No ordinary mention notice, notification or email is sent by this dedicated handler.
See it in Fieldmotion
CRM1
Quotes → Notes/Fields dialog saves textarea changes through Quote_setNotes with the notes parameter.
CRM2
No direct Quote_setNotes caller found. Mapped note edits have separate mention/update-notification behavior.
Related endpoints
Quote_getNotesreads this notes column.Quote_setFieldwrites a selected form answer instead.