options.source to list values in a field using suitelet script.

In a form created using suitelet, to list values in a field we can use the options.source in Form.addField(options).

options.source – The internalId or scriptId of the source list for this field if it is a select (List/Record) or multi-select field.

For example,
We can list the vendor records in a field in the form created using suitelet as shown below.

let vendorId = getForm.addField({
       id: 'vendorid',
       type: serverWidget.FieldType.SELECT,
       label: 'Vendor ID',
       source: 'vendor'
});

Leave a comment

Your email address will not be published. Required fields are marked *