Is it possible to get all the column ids of a subl...
# suitescript
j
Is it possible to get all the column ids of a sublist from a client script? Wish there was a
record.getAllColumns({ sublistId })
method.
e
Not natively. There are some workarounds but I don't love them
b
the risky javascript answer is
getMachine('item').getFormFieldNames()
j
@battk I think that solution only works on a native NetSuite record but it does not appear to work on a sublist generated in a Suitelet. I did manage to find another solution that is similarly hacky
document.querySelector("[name='" + sublistId + "fields']").value.split('\u0001');
b
did you replace 'item' with the id of your sublist
198 Views