Any very obvious reasons this simple script would ...
# suitescript
r
Any very obvious reasons this simple script would give an unexpected error: /** * @NApiVersion 2.1 * @NScriptType UserEventScript */ define([‘N/search’, ‘N/record’, ‘N/log’], function(search, record, log) { function beforeSubmit(context) { var transaction = context.newRecord; var transactionClass = transaction.getValue(‘class’); log.debug(‘Transaction Class’, transactionClass); } return { beforeSubmit: beforeSubmit }; });
a
var transactionClass = transaction.getValue('class');
doesn't look like its SS 2.1 ... or 2.0 for that matter
var transactionClass = transaction.getValue ({ fieldId: 'class' });
r
ok thank you @Anthony OConnor I will update it
👍 1
e
Are the single quotes correct in your example?
r
For the debug log?
or getValue
e
The whole script
r
Not sure it they are correct
e
instead of
'
r
Ok I’ll change those thanks!
a
oh yeah that is weird, didn't even notice those, are you coding in MS word or something? 😄
😄 3
r
Sublime text
e
WordPad ftw
🙄 1
🙌 3