Tasks
Update a raw task field in bulk
/a/Tasks_updateBulkData
Write one caller-selected database column across a legacy batch of task IDs.
When to use this endpoint
Tasks_updateBulkData is a highly permissive legacy helper. Do not use it for new integrations; choose a mapped or focused task update endpoint with a defined field contract.
Authentication and permissions
The request must establish an authenticated tenant context with signed API credentials or a logged-in CRM session. This legacy handler uses the tenant database prefix without calling the normal login guard.
It performs no task, page, role, ownership, or privacy-permission check. Any visibility restriction described below comes from request filters or a specific server-side rule, not from a general Tasks permission check.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | Native array | Yes | Task IDs inserted directly into an SQL IN list. Send a nonempty array containing numeric IDs only. |
val | String | Yes | Raw value placed inside a double-quoted SQL literal without escaping. |
field | String | Yes | Raw database column/expression inserted into SQL without an allowlist. It is not a mapped field name. |
Example request
// Legacy compatibility example; prefer Task_updateData.
$result = FM_api('Tasks_updateBulkData', [
'ids' => ['318', '319'],
'field' => 'details',
'val' => 'Confirm revised access details.',
]);
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":"missing or invalid parameter: ID"} | ids is absent. |
{"error":"missing or invalid parameter: Val"} | val is absent. Blank is accepted. |
{"error":"missing or invalid parameter: Field"} | field is absent. Blank is accepted and later produces invalid SQL. |
{"ok":1} | Also returned when no task matches. There is no affected-row count. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- There is no field allowlist, type conversion, related-row validation, active/deleted filter, existence check, ownership check, or privacy check.
- A scalar or empty
idsvalue is not cleanly handled. The whole batch is one SQL update rather than per-ID processing.
Side effects
- Invalidates the task cache after the raw update. It does not automatically update
last_edited, write audit history, send notifications, or run field-specific callbacks.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found.
CRM2
No direct CRM2 caller was found. Current CRM2 bulk controls use Task_updateData or focused per-task flows.
Related endpoints
Task_updateDatarestricts multi-field updates to the task map and records changes.Task_updateFieldsafely fits this route’s one-field, multi-ID use case.