Task discussion notes
Read Task discussion notes
/a/TasksNotes_get
Retrieve stored Task notes using this namespace’s selection and aliases.
When to use this endpoint
Keep Task IDs separate from note IDs; use the mapped reader when the response must include parent taskID.
Authentication and permissions
Use signed API-key authentication or a logged-in CRM session on the account’s routed host. API keys act as their owner; normal session requests need dispatcher CSRF protection where configured. Tenant data is selected from the authenticated account.
The dispatcher’s configured TeamAccess policy recognizes TaskNote IDs and checks their owning Task scope. TaskNotes_get additionally checks task_id. TasksNotes_get is a different plural namespace and has no matching scope mapping. These existing feature/actor-dependent checks are separate from a CRM2-only role grant; this work adds no permission rules.
These handlers do not add independent CRM2 Tasks View/private-Task role checks. Use the established client/dispatcher context; no new permission rule is introduced by this documentation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_ids | Native array or JSON array text | Yes | Must decode to an array. Values are joined directly into IN without per-member numeric normalization; supply only trusted positive integer IDs. Empty arrays are accepted by parsing but form invalid IN() SQL. |
Example request
$result = FM_api('TasksNotes_get', ['task_ids'=>json_encode(['18','19'])]);
Example response
[
{
"id": "45",
"note": "Call the customer",
"last_edited": "2026-11-12 09:00:00",
"cdate": "2026-11-12 09:00:00",
"user_id": "37"
}
]
Application errors normally remain JSON responses with HTTP 200; inspect error/warning keys. Numeric driver values can be strings.
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":"missing or invalid parameter: task_ids"} | Required selection is missing/invalid. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The current mobile app synchronizes task_notes through the mobile intermediary and caches task_notes-<Task ID>. That cache identity is a Task ID, not the CRM note-record ID accepted as id by these mapped office routes; the sync payload/selection contract is separate.
- Returns a bare array of id,note,last_edited,cdate,user_id. Dates remain saved SQL datetime strings; note remains raw text/encoded content. There is no order, paging, limit or author-name join.
- No parent-Task active/privacy/current-user filter is added by these handlers; their login and any dispatcher scope checks are separate. The task_notes schema has no deleted flag, so do not infer a tombstone filter.
- The legacy batch reader does not return task_id, so rows from several requested Tasks cannot be reliably grouped from that response alone; use the mapped reader with taskID when grouping is required.
Side effects
- Database read only; no mail, mentions, task timestamps or seen state changes.
See it in Fieldmotion
CRM1
CRM1 Task editor appends notes with TaskNote_new and reloads TaskNotes_get. The Tasks table loads several discussions with TasksNotes_get.
CRM2
CRM2 Task editor/moduleTasks preloads TaskNote_getRequestedDetails and derives mapped TaskNote update routes for the note field. These mapped notes can contain encoded structured content rather than the CRM1 plain note text.
Related endpoints
TaskNote_new— Append a plain note.TaskNote_updateData— Continue the related read/write workflow.TaskNotes_get— Continue the related read/write workflow.TaskNote_getRequestedDetails— Continue the related read/write workflow.