Hi! I wonder if anyone has successfully used the f...
# suitescript
m
Hi! I wonder if anyone has successfully used the function record.getSublistField on the first line on a new record (that has zero record.getLineCount)? Trying to use it on fieldChanged but gets SSS_INVALID_SUBLIST_OPERATION.
w
"Returns a field object from a sublist. Use Record.getCurrentSublistField(options) if you are working with the current and non-committed line."
The first line is probably non-committed.
But getCurrentSublistField isn't available on currentRecord. What are you trying to do?
m
Tried that as well! I want to disable fields and it works great in all scenarios but this..
Actually on new lines where other lines exists I had to do a workaround and use an existing line to get the fields and disable them..
Also thought that getCurrentSublistField would work..
w
Have you tried currentRecord.getSublist().getColumn().isDisabled = true?
👍 1
m
Will try
works great aussie conga parrot thanks!
👍 1