Import Employee’s Expense Report Currency Through RESTLET
I’m trying to add the expense report currency to the employee record in our current json script. I’m new to suite script and am not sure how to import data into the sublists. I’ve tried follow the address code as an example with no luck (which was written by someone else).
Below is the code I’ve tried but receveived an error stating: “Field currency is not a subrecord field.”
var currencySubrecord = objEmp.getCurrentSublistSubrecord
({
sublistId: ‘currencylist’,
fieldId: ‘currency’
});
currencySubrecord.setValue
({
fieldId: ‘currency’,
value: employeeData[index].currency
});
Has anyone successfully imported it. successfully. Any help is appreciated.



