How to get Field value in Client Script in Netsuite SuiteScript2.0?
Hi All,
Please use below code in SuiteScript2.0:
In SuiteScript1.0:
nlapiGetFieldValue(fldnam)
In SuiteScript2.0:
CurrentRecord.getValue(options)
Module Used:
N/currentRecord Module
Please comment if you have any question.
Thanks
Abhi
Please use below code in SuiteScript2.0:
In SuiteScript1.0:
nlapiGetFieldValue(fldnam)
In SuiteScript2.0:
CurrentRecord.getValue(options)
Module Used:
N/currentRecord Module
Please comment if you have any question.
Thanks
Abhi
How to add field label using suiteScript 2.0
ReplyDeletewhere you want to add field?
DeleteIf you want to get Field then use
Record.getField(options)
then
Field.label will give you field lable.
CurrentRecord.getValue(options) is not working in client script (view mode) and we are unable to get name/entity fields or any other fields - but its working for CurrentRecord.id or CurrentRecord.type is returning values. what is the reason ?
ReplyDeleteVery good question Jatin. Client Script works on create and edit mode better as you can get Field value and have access to fields.
DeleteInternal id and Record type is available in view mode.
If you want to read value please use lookup or search and pass internal id and type to get particular record's data only.
Never Update any field value on view of record as it is very rare to do update field on viewing record.
One scenario I can think if you want to know how many people view , create and edit any record then you can write such logic but otherwise never update record's field on view.Use Init which will work on create and edit.
Let us know if we solved your problem :)