RE: Suite script to import and run csv file
Hi Expert,In order to create a journal entry we need to populate a csv file with required fields and run in the UI.Can we write a suitte script to read the csv file and run that csv file to generate a journal entry .Could you please help out ?
What I would do is create a Suitelet script with a field of type FILE, and a button.
When the user presses the button it sends POST to the same suitelet script.
Have the POST request parse the CSV file with
'N/file'or what I use is Papa Parse (you can load into the script like this
'../modules/papaparse.min').
Once you have parsed the file and loaded into a Javascript Object then use it to create the record.
You can redirect the user to created record after it finishes saving.
Hi marvinroman,
I was not clear i think.let me re Iterate
I have created a csv file which has subsidiary,account and all the required fields to generate a journal entry.Now, generally in the ui ,we go to yhe saved csv file upload the csv file and save and run.
Now i want to automate this for example the csv file which has to be uploaded will be placed in file cabinet and netsuite should know that it is a csv file which has to be uploaded and journal entry should be created.can i automate this process using suite script?