Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Simple question- how to get data from a timesheet grid using ClientScript
I have the following code, which returns the field that triggers a changeField event. It works on a Job record type, but it doesn't work on a TimeSheet type. I am simply trying to show/hide a field based on the Customer a users chooses when adding time to a timesheet.
EXAMPLE:
define(['N/currentRecord'], function () { function fieldChanged(context) { //context.fieldId returns the proper id in all cases //getField() only works on the Job record type, returns null on Timesheet grid var f = context.currentRecord.getField({fieldId: context.fieldId}); f.isDisplay = false; } return { fieldChanged: fieldChanged } } ); Can anyone point me in the right direction? Is there another way I am supposed to get the field and its value for a Timesheet grid? I'm brand new to SuiteScript but was given this task. getField is supposed to work but it doesn't. If I pass it any field Id in the grid it returns null.
0