On a custom record I have a beforeLoad with an add...
# suitescript
w
On a custom record I have a beforeLoad with an addField that puts the new field below all of the field groups. I would like to use the container option to move it to a different group, but I'm not sure how to get the Field Group IDs. I have looked at the customise form and I'm not seeing an ID there. I also looked at the XML of the page and nothing there either. If I use addFieldGroup I can create a new group and put it there, but that is still at the bottom of the page.
m
There may be a better way to do it, but if I'm trying to insert a scripted field into an existing field group, I always just use
insertField
. If you're specifically trying to get the new field as the last field in an existing field group, if you insert the new field (let's call it Field A) before the last field in an existing field group (call it Field B), you can then insert Field B before Field A to get the end result you're going for. It's a little clunky though so if anyone else knows of a good way to get the ID of existing field groups, I'd love to know.
w
@MTNathan That is perfect for now. It does what I need it to do. Thank you.
👍 1