When to use this endpoint

Load the saved dashboard/group configuration first, then send this edit from its settings or layout controls. Re-read the configuration after an uncertain write: the handler reports validation, permission, lookup, and write failures as application errors.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. All lookups and writes are tenant-local.

The group owner or an effective edit-share recipient may create/edit/delete widgets or save layout/date filters. A view share alone is read-only. None disables its share array; otherwise string user IDs or All grant that share. No reporting-feature or additional CRM2 page-role check is applied.

For signed form requests, sign numeric scalar values as strings, including values inside native nested arrays. Send JSON text only for parameters explicitly accepting JSON strings; see Getting started.

These reporting handlers require tenant schema upgrade 794 before deployment. No request path creates or repairs schema.

Parameters

ParameterTypeRequiredDescription
idInteger-compatibleYesPositive integer ID in the authenticated tenant. Malformed, fractional, zero, or negative values are rejected; deleted records are unavailable.
valStringYesReplacement value.

Example request

$result = FM_api('ReportDashboard_setNote', ['id'=> '71','val'=>'Targets exclude draft quotes.']);

Example response

{"ok":"1"}

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.
{"error":"missing or invalid parameter: id"}Required id is absent or invalid.
{"error":"missing or invalid parameter: val"}Required val is absent or invalid.
{"error":"no permission to access api"}The group is not readable/editable, or the operation requires ownership and the caller is not its owner.
{"error":"reporting write failed"}A database write failed. Transactional operations roll back instead of returning success.
{"error":"report is not existing."}The widget is missing or deleted.
{"ok":"1","warning":"no change required"}Normalized input equals the stored value; no write occurs.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Empty text clears notes; no explicit length limit is enforced here.
  • A missing/deleted widget returns an error. Legacy NULL notes may be replaced or cleared; they are not treated as a missing widget.

Side effects

  • Checks edit permission and saves the value with the Unix edit timestamp in a transaction, invalidating the widget cache. On failure no change is committed; no activity history, notification, or group timestamp update occurs.

See it in Fieldmotion

CRM1

Edit the widget’s notes in the dashboard editor and inspect ReportDashboard_setNote. Filter browser Network requests for ReportDashboard_setNote.

CRM2

The dashboard widget editor submits ReportDashboard_setNote. Filter browser Network requests for ReportDashboard_setNote.

Related endpoints