```define(['N/record', 'N/search', 'N/render', 'N/...
# suitescript
d
Copy code
define(['N/record', 'N/search', 'N/render', 'N/email', 'N/file', 'SuiteScripts/lib/libsnag'], function(record, search, render, email, file, snag) {
	function each(context) {
k
would need to see more of your script to comment on this. It would be something after the define that is the problem
c
If i had to guess you overrode record somewhere in your code as a variable then tried to use N/record's record again after the fact. Just a guess though.
💯 1
w
☝️ done that many times in console... record = record.load({}).... facepalm
s
const record = new SalesOrder() 🙂
I don't ever have that issue
c
nobody ever does that 200iq
🤣 1
s
though I do admit I sometimes need to mix
record
and NFT together in which case there could be conflict. However unless intentionally working with generalized code I would pick a more meaningful name than 'record'. e.g.
const salesorder = new SalesOrder(123); record.submitFields(...)