Pavol
01/06/2024, 5:14 PMPavol
01/06/2024, 5:14 PMrequire(['N/currentRecord'], currentRecord => {
const validOpts = [
'A',
'B',
'C'
]
const rec = currentRecord.get()
const classField = rec.getField({ fieldId: 'class' })
const allOpts = classField.getSelectOptions()
const invalidOpts = allOpts.filter(a => !validOpts.includes(a.text))
// Filter invalid Options
invalidOpts.forEach(o => {
classField.removeSelectOption({ value: o.value })
})
})
Pavol
01/06/2024, 5:15 PM"That operation is not supported for this type of UI object: null. It is only supported for type: null."
battk
01/07/2024, 3:50 AMbattk
01/07/2024, 3:51 AMbattk
01/07/2024, 3:51 AM