I know client script do not trigger on CSV import....
# suitescript
n
I know client script do not trigger on CSV import. But the users are getting the prompt/warning message which is part of the client script validate field method. Is there a possibility that validate field works for CSV?
s
Actually, it IS possible for Client scripts to run in a non-UI context. I only know this because for years we used a bundle in which a client script performed key actions on Sales Orders, and we reported that we were getting errors creating sales orders via script or CSV import. NetSuite (the creator of the bundle) made a change so that the client script could be triggered by those methods as well, and it ran that way for years. If you go to the script deployment for the client script, there is a Context Filtering tab, and an Execution Context multi-select field. You can try unselecting some of the execution contexts to see if that can avoid the error. It’s very strange to think of a client script running in a non-UI context, but it can happen, and there may be some reasons for doing so.
n
CSV Import is part of the client script logic. Wow!
Thank you @scottvonduhn
s
it is, indeed, a very strange thing
n
So does it run all the method or just the onsave one?
s
that i don’t know. and logging inside of client script is tricky too, but perhaps you can have the script append logging info to a custom large text field and see which entry points actually run.
assuming this is a script you own. if it’s from a locked app or bundle, it will be hard to find out
n
The issue that have been reported is part of the saveRecord. It's a validation and throws a warning message when certain criteria is met.
s
Possibly other entry points get triggered to, but I don’t know which ones precisely
n
Got it. I will take a look.
189 Views