anyone had a success in adding a custom column/sub...
# suitescript
w
anyone had a success in adding a custom column/sublist via script and inserting it in-front of another column field? I tried the commented part below. Thanks in advance! (insertField works on header though)
Copy code
var sublist = form.getSublist({
	id: 'item'
});
var customTextField = sublist.addField({
	id: 'custpage_text_field',
	type: serverWidget.FieldType.TEXT,
	label: 'Text Field'
});

/*
form.insertField({
	field: customColumnField,
	nextfield: 'quantity'
});
*/
👀 1
d
If you manage to find this (documented or otherwise) please post back to this thread. Searching for this myself
n
You would probably save yourself some time adding the column in the usual fashion then scripting to show / hide it with a user event, although i don't know your exact use case.