Skip to main content

String Field Types

These field types use dataType: 'string'.

Field TypeStored Value
TextPlain text
Long TextPlain text, usually multi-line
Assist TextPlain text chosen from suggestions or typed freely
Serial NumberGenerated or manually entered business code
SearchSelected target record ID
Foreign KeyRelation key for another form
SelectSelected option value
RadioSelected option value
DepartmentDepartment ID
OrganizationOrganization ID
MemberMember ID
EmailEmail address text
LinkURL 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 || '');
}