var recExpense = nlapiCreateRecord("customrecord_expense");
recExpense.setFieldValue(1028,"3223");//employee number
nlapiSubmitRecord(recExpense);
I just wrote that simple code to create a new custom record but after the execution just a blank record is being created setFieldValue
method is not working and it does not update field value.
What am I missing? And how do you create custom records with SuiteScripts?