Asset maintenance
Set a maintenance description
/a/AssetMaintenance_setName
Replace the description stored on one asset maintenance record.
When to use this endpoint
Use AssetMaintenance_setName for CRM1’s inline Description edit on the Maintenance list.
Authentication and permissions
The request must establish an authenticated tenant through signed API-key fields or a CRM session. The handler checks tenant context but performs no page, role, or feature-permission check.
The update is scoped to the authenticated tenant table.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Positive maintenance ID. Existence is not checked. |
val | String | Yes | Replacement description. Blank is accepted; null is treated as missing. No length limit is enforced here. |
Example request
$result = FM_api('AssetMaintenance_setName', [
'id' => '61003',
'val' => 'Quarterly filter service',
]);
Example response
{
"id": 1
}
id is always the constant integer 1; it is neither the maintenance ID nor an affected-row count.
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 is absent or not positive. |
{"error":"missing or invalid parameter: val"} | val is absent or null. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- A missing ID returns the same success response as an updated row.
- The value is stored exactly, without trimming, blank rejection, or the 236-character create limit.
Side effects
- Updates one maintenance row and invalidates the maintenance cache. It does not update any edit datetime or write an audit entry.
See it in Fieldmotion
CRM1
Open Assets → Maintenance, click a Description cell, select or add a value, and inspect AssetMaintenance_setName. CRM1 does not wait for the response before updating the cell.
CRM2
No production CRM2 caller was found.
Related endpoints
AssetMaintenance_listNamessupplies CRM1’s existing-description choices.AssetMaintenance_updateFieldis the generic mapped alternative and returns old data.