Tasks
Set a task resolution
/a/Task_setResolution
Replace a task’s resolution text through the focused legacy editor contract.
When to use this endpoint
Use Task_setResolution for CRM1 Task Main resolution edits. CRM2 mapped updates add mention/audit/notification behavior that this setter does not provide.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler calls the normal login guard but performs no additional task, page, role, ownership, or privacy-permission check.
All reads and writes use the authenticated tenant. CRM1 and CRM2 apply task visibility and editing permissions in their interfaces, but these handlers do not repeat those client-side rules.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible | Yes | Task ID. Row existence and deletion state are not checked. |
resolution | String | Yes | Replacement text. An explicit empty string is accepted and clears the field. |
Example request
$changed = FM_api('Task_setResolution', [
'id' => '318',
'resolution' => 'Access details confirmed with the customer.',
]);
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":"no id parameter"} | ID is absent or integer-coerces to zero. |
{"error":"no resolution parameter"} | Resolution is absent. Blank is valid when explicitly supplied. |
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 resolution and refreshes
last_editedwithout checking affected rows. Deleted and nonexistent targets therefore return success. - There is no length validation.
Side effects
- Invalidates the task cache. Unlike
Task_updateData, it creates no mention notice, audit history, or generic notification event.
See it in Fieldmotion
CRM1
Open Tasks, edit a task, and change the corresponding field. CRM1’s task dialog and Task Main page load Task_get and save changed fields through the focused Task_set* routes.
CRM2
No direct production CRM2 caller was found; Task layouts save resolution through Task_updateData.
Related endpoints
Task_updateDatais the mapped side-effectful alternative.Task_getretrieves the stored resolution.