In a UE script I’d like to add an inline HTML fiel...
# suitescript
j
In a UE script I’d like to add an inline HTML field to a subtab of a custom record. That subtab doesn’t have any other fields on it, just a sublist. I’m not entirely sure what to use as the
container
, I tried using inspect element to retrieve the ID of the subtab, but if I provide that to the
container
it gives an Unexpected Error.
m
believe you can create your own within the UE
Untitled.js
not sure specifically about compatibility w/ custom records, but that's how it works with suitelet UIs
j
But where would that field group be added?
I don’t need a field group anyhow, just a field.
m
the group doesn't need to be displayed, it just needs to exist
.isBorderHidden = false; --> "show the group/container". solely from my quick copy. can be true to not show it
it'll reside within whichever section of the page you specify, options.tab can be used to throw it into whichever tab on the page you want the field to display beneath
use form.addFieldGroup solely to give the field a home beneath the tab you want it to live within
j
I still get an Unexpected Error as soon as I try to use the
container
option when adding the field to teh group
Copy code
let test_field_group = context.form.addFieldGroup({
	id: 'custpage_test_fg',
	label: 'test',
	tab: 'custom223'
});

let new_field = context.form.addField({
	id: 'custpage_new_field', 
	type: serverWidget.FieldType.INTEGER, 
	label: 'test integer', 
	container: 'custpage_test_fg' // fails if this is here
});
m
hm
this works for me:
Untitled.js
i don't see why yours wouldn't work. i'm curious if this ^ somehow helps.
j
let me try copy pasting yours and using my tab id
fingers crossed 1
welp
I’m an idiot
I had the internal id of the tab wrong. Or it changed somewhere along the way.
m
awesome! glad it's working lol
j
apparently it doesn’t throw an error adding a group to a nonexistant tab but it does when you try to add a field, or put a field in that group.
m
so intuitive
j
thank you for confirming that I was a different brand of insane than I thought!
👍 1