Nour
12/25/2025, 9:21 AMCeligo AI
12/25/2025, 9:21 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you want to display the document number instead of the invoice number in a select field. However, the source of the field is set to 'invoice'. In NetSuite, the source attribute of the addField method is used to populate the select field with a list of records. The value provided to the source attribute should be the record internal ID. In your case, you have set it to 'invoice', which means the select field will be populated with a list of invoice records. If you want to display the document number instead of the invoice number, you need to change the source to the record that contains the document numbers. However, it's important to note that the source attribute can only be used with certain records. If the document number is not a record itself but a field in another record, you might need to manually populate the select field using the addSelectOption method. Here is an example of how you can do it:
javascript
var documentNumbers = // get the document numbers here
var field = form.addField({
id: 'custpage_doc_num',
type: serverWidget.FieldType.SELECT,
label: 'Document Number'
});
for(var i = 0; i < documentNumbers.length; i++) {
field.addSelectOption({
value: documentNumbers[i].id,
text: documentNumbers[i].value
});
}
In this example, you need to replace the // get the document numbers here comment with the actual code to get the document numbers. The documentNumbers variable is expected to be an array of objects, where each object has an id and a value property. The id is the internal ID of the document number, and the value is the actual document number.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
12/25/2025, 9:21 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846069455
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845275939
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841918945
Celigo AI
12/25/2025, 9:21 AM