Need some help with a script that is loading a sav...
# suitescript
p
Need some help with a script that is loading a saved search and is supposed to use one of the fields found - in this case the id field for a custom record but I do not see the field populating in the log.debug. Based on what is logged for the search results I see the field and it's value but the debug for Found Id gives me a blank:
var result = loadSearch.run().getRange(0, 1000);
log.debug({
title: 'Search Results',
details: result
});
for (var i=0; i < result.length; i++) {
var custom_record_id = result[i].getValue({ name: 'id'});
log.debug({
title: 'Found Id',
details: custom_record_id
});
record.submitFields({
type: 'customrecord352',
id: custom_record_id,
values: {custrecord_salesorder: salesorderId}
});
}