Forms
Read a form name
/a/Form_getName
Resolve one stored form label without loading its definition.
When to use this endpoint
Use when a report filename or another server workflow needs only a local form’s name. For multiple IDs use Forms_getNamesByIds.
Authentication and permissions
Normal RPC calls authenticate through signed API-key fields or a logged-in CRM session. The handler deliberately avoids Core_requireLogin because report-generation helpers also call it internally.
An authenticated user and parent tenant take precedence. Without both, the legacy internal session userid, then userdata.parent, supplies the tenant. This is not a public caller-supplied tenant switch; absent context gives not logged in. No page, owner, department or archive check is made.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible form ID | Yes | Positive integer-converted local form ID. |
Example request
$name = FM_api('Form_getName', ['id'=>'1042']);
Example response
"Service checklist"
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 converts below 1; checked before tenant context. |
{"error":"that form does not exist"} | No selected row or failed row read. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Returns the stored name as a bare JSON value, normally a string, not {name:...}. A nullable name can return null. Archived and all form types are eligible.
- No outsourced-token parsing: this is a local integer ID lookup. The query explicitly supplies the resolved tenant to the database helper. No normalization, default label or pagination.
- No direct mobile app/m-service caller for this RPC was found. Mobile form definitions arrive through m’s syncDownloads form channel, not this endpoint.
Side effects
- Read-only; no history, cache invalidation, file write, URL fetch or report rendering.
See it in Fieldmotion
CRM1
No direct browser caller found. Job report/document filename helpers invoke Form_getName internally, so the browser’s report request does not necessarily show a separate RPC.
CRM2
No direct browser caller found; form labels normally come from batch/cached Forms lookups.
Related endpoints
Form_getreturns the complete local form row.Forms_getNamesByIdsreturns a batch of local names.