How can I show some specific values of a dropdown field?
Hi, I have added a status field in suitescript which have some dropdown values but I want to show some 2 or 3 values only. How can i do this?
var fld_status = o_form_obj.addField(‘status’, ‘select’, ‘Invoice Status’, ‘customlist_prodstat’);
I am imagining something like this:
var fld_status = o_form_obj.addField(‘status’, ‘select’, ‘Invoice Status’);
fld_status.addSelectOption(‘Option 1’, 1);
fld_status.addSelectOption(‘Option 2’, 2);
etc.
Thanks,
Chris
Hi,
The only way to do this is to remove the source (customlist_prodstat) and add values to the list based on a search.
I’d be happy to help if you need further assistance.
Thanks,
Chris
I had tried as suggested but getting blank in that field.
Have you also used o_form_obj.addSelectOption to add the options in manually?
Are you able to share part of your code?
// create field for invoice status
//var p_state = nlapiLoadRecord(‘customlist_prodstat’, [1, 2, 3]);//added by t2 on 15 Jun -21
var fld_status = o_form_obj.addField(‘status’, ‘select’, ‘Invoice Status’, ‘customlist_prodstat’);