Alexander Cuadros
07/09/2024, 6:29 AMvar objRecord3 = record.transform({
fromType: 'invoice',
fromId: invoiceIdP,
toType: 'customerpayment'
});
objRecord3.setValue({
fieldId: 'trandate',
value: defaultDate
});
objRecord3.setValue({
fieldId: 'paymentoption',
value: 15
});
var rid3 = objRecord3.save();
but obtain this error: {"type":"error.SuiteScriptError","name":"INVALID_FLD_VALUE","message":"You have entered an Invalid Field Value 15 for the following field: paymentoption","id":"","stack":["Error\n at RecordInvoker.save (suitescript/resources/javascript/record/serverRecordService.js:371:13)\n at NetSuiteObject.thenableFunction() (suitescript/resources/javascript/record/proxy.js:115:24)\n at Object.onRequest (/SuiteScripts/DT-009 - /SD_SL_EmailPa.js:449:55)"],"cause":{"type":"internal error","code":"INVALID_FLD_VALUE","details":"You have entered an Invalid Field Value 15 for the following field: paymentoption","userEvent":null,"stackTrace":["Error\n at RecordInvoker.save (suitescript/resources/javascript/record/serverRecordService.js:371:13)\n at NetSuiteObject.thenableFunction() (suitescript/resources/javascript/record/proxy.js:115:24)\n at Object.onRequest (/SuiteScripts/DT-009 - Card/SD_SL_EmailPa.js:449:55)"],"notifyOff":false},"notifyOff":false,"userFacing":true}
Fakhri Hilmi
07/10/2024, 3:18 PM