Suitescript1.0 help getting label value
I’m trying to do the equivalent of this in 2.0, which works
var thisConfig = config.load({
type: ‘companypreferences’,
isDynamic: true
);
var objFields = thisConfig.getFields();
for (var f = 0; f < objFields.length; f++) {
var fieldObj = thisConfig.getField({
fieldId: objFields[f]
});
var label = fieldObj.label;
}
But trying in 1.0, the label is always null. Examples of what I’ve tried:
var companypref_config = nlapiLoadConfiguration(‘companypreferences’ );
var companypref_fieldIDs = companypref_config.getAllFields();
var compPref_field = companypref_config.getField( companypref_fieldIDs[i] );
var label = compPref_field.getLabel();
if (!label){
compPref_field = nlapiGetField( companypref_fieldIDs[i] );
label = currentField.getLabel(); <- still null
}
nlapiGetField() will return values but label is always null.
Any ideas?
Never mind, looks like I just needed to search in all uppercase, because that makes sense.



