Annoyingly, newRecord.getFields() only gets the fi...
# suitescript
w
Annoyingly, newRecord.getFields() only gets the fields that have a value in beforeLoad. Looping them to set all fields to INLINE will naturally not include fields that doesn't have a value. Instead, I ran a query to get all the custom fields from the table CustomField. Is there a better way to get all fields in the form in beforeLoad?
netsuite 1
m
Are you trying to prevent any edits in edit mode? Maybe you could just redirect to the record in view mode instead?
w
Yes, I'm trying to prevent edits, but I have a custom sublist with checkbox:es that needs to be available for editing. So I can't lock down the whole record completely. The user needs to validate a bunch of lines by checking those boxes and then submit the record. It was fast enough with the query-method in this case.
👍 1