Any idea how I can add a select field to a certain...
# suitescript
b
Any idea how I can add a select field to a certain field group? The field will be added via an UE script in the beforeLoad on a custom record.
Copy code
var form = ctx.form;

var selectField = form.addField({
 id: 'custpage_selectfield',
 type: serverWidget.FieldType.SELECT,
 label: 'Test',
});
I can’t find a way how to move the field to a certain field group which was created via a custom form. The field is now added to the last field group on the custom form.
b
@PNJ yes, I’ve tried it. But what should then be the internal id from the Field Group? I need to add the field to the Transaction References Field Group.
p
Does this work? https://netsuite.custhelp.com/app/answers/detail/a_id/43681 Use
insertField
to specify where it goes
🎉 1
I've not had to do this before, I'm just reading the docs 🙂
b
Going to test it, thanks
@PNJ you’re the best! It works.
p
Awesome 🙂
b
how not to make things complicated 😛
p
Yeah, seems weird to not provide a
getFieldGroups()
, but meh
b
You saved the day my friend