Saved views and configuration
Update selected filter preset fields
/a/UserFilter_updateData
Patch one or several preset rows using the CRM2 field map.
When to use this endpoint
Use for CRM2 inline edits or bulk changes. This differs from UserFilter_save: it accepts mapped keys and preserves unspecified fields and creation time.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. A tenant login is required.
Reads expose only filters owned by the current user or marked public=1. Writes require ownership or client-administrator permission; another user’s public filter is not editable merely because it is visible. Assigning or transferring ownership to another active tenant user requires client-administrator permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id / ids | Positive integer string or nonempty native list | Yes | Every physical target must exist and be authorized. id takes precedence. Empty lists and unknown IDs are rejected. |
Mapped changes | Scalar or native JSON value | No | Mutable keys: name (nonempty, max 182 characters), pageType (nonempty, max 80 characters), userID (positive active owner), data/meta (native JSON or valid JSON text), public (boolean/0/1/true/false). JSON replaces the whole column. Creation date and primary ID cannot be edited; id is only a selector. |
Example request
$result = FM_api('UserFilter_updateData', ['id' => '1088', 'name' => 'Northwind jobs']);
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 must be positive integers; malformed/missing selectors are rejected. |
{"error":"filter with that ID does not exist"} | Any selected target is absent. |
{"error":"filter permission denied"} | A non-administrator targets another owner or attempts an unauthorized owner assignment. |
{"error":"configuration read failed"} | A required database read fails; no write is committed. |
{"error":"configuration write failed"} | Persistence or checked history fails; the transaction rolls back. |
{"error":"configuration transaction failed"} | Transaction begin or commit fails; no success is reported. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- All selected rows are locked and authorized before mutations. The batch commits atomically; a missing/unauthorized target or later write/history failure leaves earlier rows unchanged.
- Unspecified fields remain unchanged. Unknown updateData keys are ignored; updateField rejects unknown or read-only keys. Supplied cDate in updateData is rejected. Ownership transfer to another user is administrator-only.
- No last-edited column is added; creation time is preserved.
- Equal values or no mutable changes return {"warning":"No Change."}; successful changes return {"ok":1}.
Side effects
- Changed rows request their table’s cache marker. Row changes and history commit in one checked transaction; a write, history or commit failure rolls back the batch.
- No customer/job data, notification or email is changed. No tenant feature setting alters this endpoint’s behavior.
See it in Fieldmotion
CRM1
No direct CRM1 caller for this mapped route was found. CRM1 Settings → Filters uses UserFilters_getDT, UserFilter_setName, UserFilter_setPublic and UserFilter_delete.
CRM2
Open CRM2 Settings → Filters. Its UserFilter/UserFilters widget prefixes resolve through shared detail/table/edit helpers; filter browser Network requests for this exact route. The widget’s shared updateData helper generates this route for name/privacy edits.
Related endpoints
UserFilter_getRequestedDetailsverifies the stored fields.UserFilter_updateFieldchanges one named mapped field across selected IDs.