am having blonde moment. Why when I try nlapiGetF...
# suitescript
j
am having blonde moment. Why when I try nlapiGetFieldValue(‘name’); on a custom record that definitely has a name field with a value in it, am I getting “null”?
b
If the field is restricted it could return 'null'. Have you checked the settings for the field?
n
@jen If it's beforeSubmit you'd get away with what you used otherwise my money is on you need: <recordObject>.getFieldValue('name');
j
I’m just trying in teh console
<recordObject>.getFieldValue(‘name’); also gives null
I was actually trying first with
var rec = currentRecord.get(); rec.getValue({fieldId: 'name'});
in console
n
Ah so, nlapiGetValue in the console, should work if the record is in edit mode and visible via the UI (IE on the form). I'd also try assigning it to a variable and check the variable, seen weird inconsistency just getting the value...