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.

Rookie Asked on March 7, 2024 in SuiteScript.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor