Schedule of Rates
Set a Schedule of Rates description
POST
/a/ScheduleOfRates_setDescription
Replace the trimmed description of one Schedule of Rates row.
When to use this endpoint
Use ScheduleOfRates_setDescription for CRM1 inline description editing.
Authentication and permissions
The request must establish tenant context with signed API credentials or a logged-in CRM session. The handler checks for the tenant database prefix rather than calling the normal login guard.
No additional page or role permission is checked. The CRM screens apply their own client-side Schedule of Rates permissions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Positive rate ID. |
val | String | Yes in practice | Complete replacement after trimming. Blank clears the description. Omission is not explicitly validated. |
Example request
FM_api('ScheduleOfRates_setDescription', [
'id' => '430001',
'val' => 'Annual preventative service',
]);
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"} | The ID is absent or not positive. |
{"error":"schedule of rates does not exist"} | The ID has no row. |
{"ok":1,"msg":"no change needed"} | The trimmed value exactly matches the stored description. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- No length or content validation is applied.
- There is no filtering or pagination; one row is read and conditionally updated.
Side effects
- On change, advances
last_editedand thescheduleOfRatescache marker. - Fires the tenant-configurable
SOR_editevent with the rate ID. Any configured listeners run synchronously and can add integration-specific side effects.
See it in Fieldmotion
CRM1
Click the Description cell on the Schedule of Rates page and blur the editor.
CRM2
CRM2 changes description through ScheduleOfRate_updateData.
Related endpoints
ScheduleOfRates_setNamechanges the display name.