Hi people! Hope u r doing well. Does CSV-Import cr...
# suitescript
v
Hi people! Hope u r doing well. Does CSV-Import creates some sort of Job/Task Record so I can assign a User Event Script on it?
e
@Vlad Shepshuk When you do a CSV import, there is checkbox in the wizard that you can tick to run any script in the backend
n
You would want a user event script on the record being updated. You can filter the logic looking at the runtime.ContextType to run those tasks you might only want to run specifically for CSV uploads.
v
@eminero thx for the answer, as far as i know, that checkbox enables Script execution on records that are being imported. What I need is to be able to do some logic after csv import is finished. There is a Job Status Page showing statuses of imports, I assumed theese statuses are records, but unfortunatelly i can't choose Job Status on Script Deployment Record(Applies To) -_-
@NElliott true that, but what type of record do I choose on a Script Deployment Page ? 🙂
n
If you're doing a CSV import presumably you are updating a specific record, at which point that's the recoord your UE runs on...
Ah hang on you specifically want to track the status, sorry no idea on that, that's a bit different to your initial question
e
@Vlad Shepshuk it seems you need to create a UE with an afterSubmit Event, I mean once each record is imported you would trigger some logic per record imported, I do not know if there is a way to run something once the whole process is over
v
@eminero I have 25K records imported per one CSV-import 😄 Having UE script running on each record would cause a disaster))
😮 1
@NElliott yes, CSV import status
n
not really a disaster but could be sloooooow 😉
If you want that level of control you probably want to build your own routines that allow you to upload a CSV.
a
I have a nice trick here (if its applicable)
When we have CSV files integrations / automations processes: • if we generate the file, then we create a column with the file name • if the file is built externally then we ask to specify the file name in the column We process all files present in a specific folder (they need a specific CSV import to run) For each file I create a record in a custom record as a record type referring the file. The transaction have a field mapped by name with a reference to the same record In this way: • we create the record • we submit the CSV • Everything else is done as a standard from Netsuite with this approach: • We can easily understand which file has created the transaction (point & click) • We can track the detailed process in real time • We can see in a sublist all transactions created from the origin file and within that specific execution. Really more easy to do than to explain. And it works perfectly The bundle I've created is a lot more complete so I'm only explaining the base. We also perform a line count so that the user can easily understand missing lines and only in case navigate and check the CSV import response file. A huge limitation is that if you submit a CSV from a scheduled script no emails will be sent to users when the process is ended.
v
@Andrea Rivetti wow that's an answer! Thanks! I actually ended up with Scheduled Script which runs at pick-off hours and checks the status of custom record(created by CSV import) status field(set up after CSV task submitted)
Thank you very much guys!