Reputation: 166
We have an error. Any time someone goes to a Credit Card Sale record and clicks the print icon they get an error that says "An unexpected error has occurred. Please click here to notify support and provide your contact information." I am assuming that behind the scenes a custom script someone else has written is failing. How can I track this down to fix it?
Upvotes: 2
Views: 5068
Reputation: 15367
Depending on how many scripts you have active in your Netsuite account you may want to first have a look at the script logs.
If your error is not there then try changing the form you are printing with. If that fixes the issue then it may be you have something on the form that NS can't handle. NS throws "unexpected error" for all sorts of things it should be able to report more about.
Upvotes: 3
Reputation: 7343
Printing transactions related error happens due to "Advanced PDF/HTML Templates" errors as well.
You can edit current record and then you would see customise link at top-right , clicking which you would see customise form
. Upon customising form you would see Print Template
select option and Printing Type
radio.
If radio is set to advanced you would find template at
To view templates go to customisations > forms > Advanced PDF/HTML Templates
if radio is set to basic you would find template at customisations > forms > Transaction form PDF layouts
Advanced templates involves fair amount of scripting and HTML/CSS tags which are likely to hold a programmer bug.
If advanced template is being used then I advise you to switch to a standard template over custom template, if that also gives error switch to a standard transaction form by moving to basic from advanced, which will help you to diagnose the culprit component.
Upvotes: 0
Reputation: 2288
In addition, what you can do with a minimum change to identify the script and error details is, simply go to the deployed scripts and put your mail in to NOTIFY EMAILS
. It will trigger you the script name along with the error in case it is any system generated error.
Upvotes: 1
Reputation: 2840
You can start by looking at the scripts deployed in the record. You can do this by going to Customizations > Scripting > Scripted Records.
I would recommend that you undeploy all the scripts and inactivate all workflows for the record.
Then check if the error occurs, if not deploy 1 script then try again. I would deploy scripts in this order
I know its tedious but as far as I know, there is no other way to easily track which script is causing the unexpected error.
Another option you can take is to do a Script Log search. I believe Unexpected Errors for script are added to the script regardless of the log level.
Upvotes: 2