When submitting a CSV import task via script using...
# suitescript
k
When submitting a CSV import task via script using the
N/task
module, the
task.checkStatus()
method only indicates whether the job is *Pending/Completed*โ€”it does not provide detailed results on whether the import itself was successful or if it encountered errors. See screenshot this would appear Completed but actually is a failed import of 0/2 records Has anyone found a workaround to programatically retrieve detailed import results (success/failure counts, error messages, etc.) outside of manually checking the UI?
a
nope, and I've spent a long time trying
best awful workaround I have.... get the import record type do a search of that record type and store the count in var count the lines in the csv file, store that in another var run the import when status = completed run search on that record type again store in var if searchBeforeCount + csvLineCount === searchAfterCount all lines created records 100% successful
this does not work transaction imports where a each csv row is actually a transaction line not a new record ๐Ÿ˜•
and it also breaks if some other process runs that creates/delete records of that type