Anyone ever encounter this before? RCRD_HAS_BEEN_C...
# suitescript
m
Anyone ever encounter this before? RCRD_HAS_BEEN_CHANGED on a Deposit record...only when a transaction is added on the payment tab.
b
fairly common on records with slow user event / workflows deployed on them
m
It's a deposit, so there isn't a "scripted records" listing for it?
No Workflows touching deposits. No scripts I can find.
b
the usual is to start the scripted records page
deposits should be on there
m
Customer Deposits are. Deposits are not.
b
unless there isnt anything deployed on it
in which case the other suspect are scheduled and map/reduce scripts
those are more rare, since they arent triggered realtime
m
Nothing running on Deposits. Been working at this for two days. This issue has got me.
b
so it typically requires someone to save a recod at the same time as that other script
if the account is new and not setup properly, then you can also see these kind of errors
m
The only piece of nugget I have found is this: "In some cases, you must specify the lineId when depositing payments to ensure the correct lineId is used and avoid the RCRD_HAS_BEEN_CHANGED error. In particular, journal entries can have a lineId that is not 0. If a journal entry is loaded in the line, you are adding paymentId. Therefore you must explicitly set the lineId."
Copy code
let line = 0;
            paymentArr.forEach(depositLine => {
                depositRecord.setSublistValue({
                    sublistId: 'payment',
                    fieldId: 'id',
                    line: line,
                    value: depositLine.id
                });
                depositRecord.setSublistValue({
                    sublistId: 'payment',
                    fieldId: 'deposit',
                    line: line,
                    value: true
                });
                depositRecord.setSublistValue({
                    sublistId: 'payment',
                    fieldId: 'paymentamount',
                    line: line,
                    value: depositLine.amount
                });
                line++;
            });
b
doesnt look like the right way to create a deposit
you are supposed to match against the existing lines, not try to add new ones
265 Views