I have a SuiteScript that is used to import Supplier Pricing from a CSV file uploaded to the File Cabinet using a pre-set Import Template
This has been working well for many months, but recently some have been failing with the error:
Invalid subsidiary reference key 2 for vendor <NULL>.
This error appears on every line of the import, and it also puts a question mark at the front of the column header for Supplier Internal ID
Subsidiary is set as a default value in the Import Template:
This is how our subsidiaries are set up:
I can import the same CSV file through the normal import process (using the same Import template) and it imports successfully.
The scheduled Script is set to Execute as Role Administrator.
The Supplier on the Item is set to the same Subsidiary:
The Item is set to the Parent Subsidiary with include children ticked:
But we have other Items / Suppliers where this import works, and they are configured the same way.
I've checked the CSV file in Notepad and there are no extra lines or columns or rogue commas (that I can see).
The file imports via the UI without error, so I can only assume there is some kind of random issue with the Script import.
But again, this script works on some imports, but not all.
Any suggestions on how to trace to root cause of this intermittent issue?