Hi everyone, `var accountField = form.addField({...
# suitescript
e
Hi everyone,
var accountField =  form.addField({
id: 'accounts',
type: ui.FieldType.SELECT,
source: 'account',
label: 'Account'
});
How can I filter the source of this field, to show only "Bank" accounts? I know there is a filter option, but I can't find it in the docs.
a
1. the id needs to be in the format
custpage_accounts
2. I don't think there IS a filter option, which would explain why its not in the docs. 3. to do what you want I think you'd need to search for accounts filtered by accttype = Bank, and then add the name/id pairs using a loop and
accountField.addSelectOption()
e
Thanks @Anthony OConnor That was my initial setup, was trying to use a more simple approach, but alas, there is none
👍 1