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?

Rookie Asked on September 20, 2023 in SuiteScript.
Add Comment
1 Answer(s)

Never mind, looks like I just needed to search in all uppercase, because that makes sense.

Rookie Answered on September 21, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor