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

ParameterTypeRequiredDescription
id / idsInteger-compatible scalar or native listNoid takes precedence. Positive record IDs are the normal selection. Scalars integer-convert; encoded JSON list text is not decoded. On mapped details, omission or an empty native list adds no ID restriction, so supply another bounded filter deliberately.
fieldsNative list of mapped namesNo for details; required for tablesDetails default to all mapped fields. Unknown names are omitted; id is always included. JSON-encoded list text is not decoded. Whole JSON/text columns remain encoded strings, while nested metadata projections can decode values.
Note filtersMapped valuesNoid, userID, note, lastEdited, editedUUID, taskID and cDate. userID/taskID are integers; note/editedUUID text; date aliases are SQL datetime text. These mapped writers do not protect lifecycle/author/relationship fields merely because the UI hides them.
Mapped filters / order / advanceSearchScalars, native lists or structured query controlsNoMapped filters combine with AND; lists use IN. Detail text filters are trimmed case-insensitive exact matches; table text filters use substring LIKE. Detail order accepts mapped names or {id,dir} descriptors. Structured comparisons use mapped columns, condition/value and optional andOr/special. These legacy wrappers do not add a strict query-control allowlist; raw advanced conditions are a trusted UI surface, not an integration SQL interface.

Example request

$result = FM_api('TaskNote_getRequestedDetails', ['taskID'=>'18','fields'=>['id','taskID','note','userID','cDate']]);

Example response

[
  {
    "id": "45",
    "taskID": "18",
    "note": "Call the customer",
    "userID": "37",
    "cDate": "2026-11-12 09:00:00"
  }
]

Application errors normally remain JSON responses with HTTP 200; inspect error/warning keys. Numeric driver values can be strings.

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.

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 row array for mapped details, not a single object; empty results are []. Whole metadata columns remain encoded strings. Database scalar types remain driver-dependent. The detail helper can also turn a failed database read into [], so it is not a distinct read-failure signal.
  • 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.
  • Missing Tasks/notes produce empty results rather than a distinct not-found parent error.

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