How to add saved search result to select field in suitelet as options?
I have created suitelet to add select type field. I have created field, but now I want to add search result as options to the select field. How its can be done? Please Help!
perform your search then, iterating your results, for each result:
subsidiaryField.addSelectOptions({value:<THE_RECORD_INTERNALID>,text:<THE_TEXT_VALUE>});
sorry, typo addSelectOption not the plural: addSelectOptions
You can refer below code,
var formField = form.addField({id: ‘custpage_saved_searches’, type: ‘select’, label: ‘List of Transaction ‘});
var objSavedSearches = getSavedSearches();
for (var i = 0; i < objSavedSearches.length; i++) {
if (i == 0)
formField.addSelectOption({ value: “”, text: “”, });
formField.addSelectOption({ value: objSavedSearches[i].id, text: objSavedSearches[i].title, }); }
thanks ! can we add border and collapse & expand option to field group? like, for example like sales order list page filter ?
Here’s an article I wrote that shows the full code. Hope it helps: