Saved views and configuration
Delete configurable picklist choices
/a/CommonList_deleteData
Remove matching non-required choices from a tenant list.
When to use this endpoint
Use only with an explicit physical row ID after checking that the choice is not required and is no longer needed. The CRM2 settings UI sends one physical ID at a time.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. The handler requires login, without an additional list-management/page/role permission check. Lists belong to the authenticated tenant, not an individual user.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id / ids | Positive integer string or nonempty native list | Yes | Physical row IDs, not the business values returned as id by CommonList_getRequestedDetails. id takes precedence. Other mapped filters do not replace this selector. |
Example request
$result = FM_api('CommonList_deleteData', ['id' => '1042']);
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"} | ID missing, malformed or nonpositive. |
{"error":"list item does not exist"} | At least one selected row is missing. |
{"error":"Required item. Cannot be deleted."} | At least one selected item is required; no selected item is deleted. |
{"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
- Every selected physical row must exist and be optional. The full nonempty ID list is validated and locked before deletion; an empty request cannot delete other choices.
- There is no customer/job reference rewrite or dependency check. Removed business values can remain on historical records.
- Rows are still physically removed pending the separate retention migration. This endpoint does not restore them.
Side effects
- Deletes only selected optional rows and requests the common_lists cache marker. The generic helper writes deletion metadata and a delete history entry. Row deletion and checked deletion-audit errors are enclosed in a transaction; the legacy history helper itself does not check its write result.
- No notification, email or dependent customer/job change.
See it in Fieldmotion
CRM1
No direct CRM1 caller to this CommonList route was found in the source search. CRM2 uses these generic list endpoints for configurable customer contact types, job sub-statuses, purchase statuses and contract stages.
CRM2
Open CRM2 customer settings → Contact Types. pageSettingsContactTypes.js uses CommonList/CommonLists widget prefixes and shared create/detail/edit helpers. Filter the Network panel for this endpoint. Delete/bulk delete checks required through the detail reader, asks for confirmation and issues individual delete requests.
Related endpoints
CommonLists_getDataTablereturns the physical IDs needed for deletion.CommonList_getRequestedDetailsexposes required for UI prechecks, but remaps returned id to business value.