Schedule of Rates
Set a Schedule of Rates name
POST
/a/ScheduleOfRates_setName
Replace the trimmed name of one Schedule of Rates row.
When to use this endpoint
Use ScheduleOfRates_setName for CRM1 inline name 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 | Complete replacement after trimming. A present blank value is accepted and clears the name. Duplicate names are accepted. |
Example request
FM_api('ScheduleOfRates_setName', [
'id' => '430001',
'val' => 'Annual service plus',
]);
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":"missing or invalid parameter: val"} | The val key is absent. |
{"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 name. |
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 nonblank, uniqueness, or length rule is enforced server-side.
- Changing the name changes the combined display label used by
ScheduleOfRates_getByNameAndCode.
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 Name cell on the Schedule of Rates page and blur the editor.
CRM2
CRM2 changes name through ScheduleOfRate_updateData.
Related endpoints
ScheduleOfRates_setCodechanges the code portion of the display label.