Forms
Read a table form’s fields
/a/Form_getTableFields
Fetch the raw field definition of a Job, Quote or Invoice Table.
When to use this endpoint
Use when a report-document designer needs a table’s question columns. For complete definitions or other table types use Form_get/Forms_getById.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.
The handler performs no form, department, owner, or page-permission check unless the page below says otherwise. CRM navigation may impose additional UI-only access rules.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible form ID | Yes | Presence/non-null required, then integer-converted. Blank/zero is a lookup for zero rather than a validation error. |
Example request
$table = FM_api('Form_getTableFields', ['id'=>'1042']);
Example response
{
"id": "1042",
"name": "Parts used",
"fields": "[{\"name\":\"Item\",\"type\":\"input\",\"meta\":\"{\\\"id\\\":1042001}\"}]"
}
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":"no table id supplied"} | id absent/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
- Returns a raw row with id, name and fields only. fields remains encoded JSON text, including nested encoded field metadata.
- Only type 3, 6 or 8 matches. Other types (including Opportunity Table type 10), absent rows and failed reads return false. Archived matching tables are included.
- No page/owner/department check, nested-table resolution, field normalization, sorting or paging.
- 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
Report Document editor requests Form_getTableFields when inserting/designing table fields. Filter that request and JSON-decode its fields property in the caller.
CRM2
Report Document editor uses the same endpoint when constructing table fields.
Related endpoints
Form_getreads definitions without this three-type restriction.Forms_getTablesByIdsresolves linked Job Tables in a batch.