KnotKnick
01/25/2021, 5:46 PMsoRec.setSublistValue({
sublistId: 'item',
fieldId: 'custcol_first_email',
line: i,
value: true
});
Is there something that I am missing?MTNathan
01/25/2021, 5:51 PMT
or F
values instead of boolean `true`/`false`. Not sure if that's the issue here, but it's probably worth a shot at least. If that doesn't fix it, some more context within the script might help pinpoint the problem - what type of script, how you're loading soRec
, etc.KnotKnick
01/25/2021, 6:00 PMT
or F
as well as 'T'
or 'F'
. `T`/`F` gave me a reference error, while nothing happened while wrapping those boolean value as a string.
Regarding the script, its a map reduce script, and I am loading the SoRec
like this:
var soRec = record.load({
type: record.Type.SALES_ORDER,
id: so_id
});
Nicholas Klug
01/25/2021, 6:01 PMNicholas Klug
01/25/2021, 6:02 PMNicholas Klug
01/25/2021, 6:03 PMSandii
01/25/2021, 6:10 PM'0'
, this can cause problems. Also assuming didnt mistakenly start indexing at 1 instead of 0?KnotKnick
01/25/2021, 6:16 PM{"type":"error.SuiteScriptError","name":"RCRD_HAS_BEEN_CHANGED","message":"Record has been changed","stack":["anonymous(N/serverRecordService)","reduce(/SuiteScripts/test.js:245)"],"cause":{"type":"internal error","code":"RCRD_HAS_BEEN_CHANGED","details":"Record has been changed","userEvent":null,"stackTrace":["anonymous(N/serverRecordService)","reduce(/SuiteScripts/testjs:245)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":false}
KnotKnick
01/25/2021, 6:17 PMNicholas Klug
01/25/2021, 6:17 PMKnotKnick
01/25/2021, 6:17 PMNicholas Klug
01/25/2021, 6:18 PMNicholas Klug
01/25/2021, 6:20 PMKnotKnick
01/25/2021, 6:23 PMbeforeSubmit
action, however, the two scripts have completely different logics running. I keep on getting the same after running the MR script againNicholas Klug
01/25/2021, 6:23 PMKnotKnick
01/25/2021, 6:23 PMNicholas Klug
01/25/2021, 6:24 PMNicholas Klug
01/25/2021, 6:24 PMNicholas Klug
01/25/2021, 6:25 PMNicholas Klug
01/25/2021, 6:25 PMKnotKnick
01/25/2021, 6:27 PMNicholas Klug
01/25/2021, 6:28 PMKnotKnick
01/25/2021, 6:30 PMNicholas Klug
01/25/2021, 6:31 PMSandii
01/25/2021, 6:31 PMSandii
01/25/2021, 6:31 PMNicholas Klug
01/25/2021, 6:31 PMKnotKnick
01/25/2021, 6:33 PMNicholas Klug
01/25/2021, 6:36 PMKnotKnick
01/25/2021, 6:39 PMNicholas Klug
01/25/2021, 6:39 PM