String Field Types
These field types use dataType: 'string'.
| Field Type | Stored Value |
|---|---|
| Text | Plain text |
| Long Text | Plain text, usually multi-line |
| Assist Text | Plain text chosen from suggestions or typed freely |
| Serial Number | Generated or manually entered business code |
| Search | Selected target record ID |
| Foreign Key | Relation key for another form |
| Select | Selected option value |
| Radio | Selected option value |
| Department | Department ID |
| Organization | Organization ID |
| Member | Member ID |
| Email address text | |
| Link | URL text |
Use context.formSchema.field when a script needs the concrete type before deciding whether a string is a plain value, an option value, or a relation ID.
const field = await context.formSchema.field({
formApiName: 'orders',
fieldApiName: 'customer',
});
if (field?.type === 'search') {
const customerRecordId = String(record.data.customer || '');
}