Anyone know why this script stopped working recent...
# suitescript
r
Anyone know why this script stopped working recently? It's a data validation on the timesheet. No changes have been made to our account.
c
What error are you getting? Can you confirm if the script running?
Also, what's this? Is the code in the try block commented out?
r
The scribble is nothing. The script is running, but it's throwing the error when Billable was not checked and a Description was entered. Do you know how to see how the script is evaluating (like we can in Workflow)?
c
You won't be able to see that in a visual way with SuiteScript, you'd have to look at (and understand ) the code.
Paste the error here - you can get it from the UI or from the script deployment record.
r
It looks as if someone has commented out the code you were previously using.
/**
is not something to be ignored.
this 2
y
I'm sure error throwing when the record type is timeBill because when the record type is timeBill then there is a custom column field which is getting value by nlapiGetFieldValue this wrong, here nlapiGetLineItemValue should be used. If you need any help please DM me.
n
If you are 100% sure it was working before but it's not now, based on what you posted I'd look to see if that comment block start has an end. */ Before you start trying to understand the code, although I'd want to know who commented it out recently 🙂 Also, is that form id correct, "321" always folly to have a hard coded value like that.
y
Yeah then we need to figure out doing debugging
n
Share the full script. Like the others have pointed, it seems that the code is commented. Also, check the form ID.
r
Thanks to all. NS Support looked at it and said timebill was improperly written: if(recType != '*timebill*'), instead of if(recType != '*timeBill*').
n
How did that ever work? Bizarre. 😄
c
It's more bizarre that NS support helped you with a script!
🤣 2
r
some support reps are definitely down for whatever. lol
n
Seems they have nothing much to do at the moment.
c
Love when a rep is DTS (down to script)
😂 1
SuiteScript and chill
🤭 1
r
Yes, this was strange, b/c it was working fine up to Dec. 8.