0
votes

I'm user suitescript 2.0. In the custom Record Types, I build client-script to load 1 records from ITEM_FULFILLMENT.

var ffid = 123
var itemffo = record.load({
                type : record.Type.ITEM_FULFILLMENT,   
                id: ffid,
                isDynamic : false/true
            });

After that, I clicked on button Save. I get error: "Record has been changed"

I did not change any itemffo. Just get data in it. Please, help me to fix this problem?!

2
I would check the system notes to see who changed the record. Could it be that somebody else changed it or is your user shown as the one making the changes? - Maria Berinde-Tampanariu
oh, no. At the time I coded, Only me run it on Developer enviroment, record save normal if I don't use record.load. - Cristen Rafalko
I read help: When a SuiteScript 2.0 script creates, copies, loads, or transforms a record in standard mode, the record’s body fields and sublist line items are not sourced, calculated, and validated until the record is saved (submitted) with Record.save(options). >>> STILL error - Cristen Rafalko
The error is thrown on your custom record, not the Fulfillment record. Can it be the you have some user event on the fulfillment records that manipulates your record on load? - Igor Po
on beforeLoad? I have some code on user event script in FF. But I thought it's only effect in FF record?! How can I fix if I met the problem you told Igor? - Cristen Rafalko

2 Answers

1
votes

This happens when there is a difference between context.oldrecord and context.newrecord . Any other script such as ClientScript/UserEvent Script/WorkflowAction Script can change/modify the value in context.newrecord .

0
votes

this happens when you have error in your code. Try to write the code inside a try catch.