Set value on a dropdown field
Answered
When im trying to set values on regular fields everything works well but i cannot set a value on a dropdown field like record.setValue(id, value) always returns blank
Best answer
2 options:
- If you know the Id of the dropdown record, then you can use that:
objRecord.setValue({ fieldId: ‘department’, value: 123});
- If not, you can use setText
objRecord.setText({ fieldId: ‘department’, text: ‘Department 1’});
Insert and removal of data thru client script from a list field can only be done by suitelet and userevent fields.
ex.
nlobjField.insertSelectOption
nlobjField.removeSelectOption
battk
Share the code that fails.