Below are the sub records for Customer using currentRecord.getSublists();
I'm getting like ["currency","creditcards","grouppricing","itempricing","systemnotes","access","activeworkflows","recmachcustrecord2","recmachcustrecord_2663_parent_cust_ref","subscriptions"]
for recmachcustrecord2
sub record. I want to store into another variable like
var sublistFieldValue = currentRecord.getSubrecord({
fieldId: 'recmachcustrecord2'
});
but I'm getting like
"type":"error.SuiteScriptError","name":"FIELD_1_IS_NOT_A_SUBRECORD_FIELD","message":"Field custrecord_acceptable_min_shelf_life is not a subrecord field.","stack":["anonymous(N/serverRecordService)","onAfterSubmit(/SuiteScripts/cus.js:38)"],"cause":{"type":"internal error","code":"FIELD_1_IS_NOT_A_SUBRECORD_FIELD","details":"Field custrecord_acceptable_min_shelf_life is not a subrecord field.","userEvent":"aftersubmit","stackTrace":["anonymous(N/serverRecordService)","onAfterSubmit(/SuiteScripts/cus.js:38)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":false}
Thanks in Advance!