Still getting insufficient permissions on save.
# suitescript
r
Still getting insufficient permissions on save.
p
Some fields have specific permissions, also custom records might use permissions list, rather than custom records permissions (and if they're updated by a user event or something ...). I guess the other issue could be that it's in a closed period. What's the error that you get?
r
Wow, that was eerily accurate for my situation.
{"type":"error.SuiteScriptError","name":"INSUFFICIENT_PERMISSION","message":"You do not have permissions to edit this transaction.","stack":["anonymous(N/serverRecordService)","processInvoices(/SuiteScripts/Invoice/Suitelet/[MJA]batchInvoiceProcessing.js:474)","POST(/SuiteScripts/Invoice/Suitelet/[MJA]batchInvoiceProcessing.js:303)","onRequest(/SuiteScripts/Invoice/Suitelet/[MJA]batchInvoiceProcessing.js:22)"],"cause":{"type":"internal error","code":"INSUFFICIENT_PERMISSION","details":"You do not have permissions to edit this transaction.","userEvent":null,"stackTrace":["anonymous(N/serverRecordService)","processInvoices(/SuiteScripts/Invoice/Suitelet/[MJA]batchInvoiceProcessing.js:474)","POST(/SuiteScripts/Invoice/Suitelet/[MJA]batchInvoiceProcessing.js:303)","onRequest(/SuiteScripts/Invoice/Suitelet/[MJA]batchInvoiceProcessing.js:22)"],"notifyOff":false},"id":"","notifyOff":false}
s
yup, I've encountered 'insufficient permission' error a lot when editing transactions on a closed period
👍 1
p
I wouldn't recommend reopening a closed period, but if that isn't the error (sorry if it's right there in the error, I did read it, but maybe missed the part you're looking at), you could try making the same update via csv import without triggering scripts and ignoring mandatory fields. See what happens?