I'm trying to save a customer payment record and t...
# suitescript
m
I'm trying to save a customer payment record and the id returned is
0
, is there a way to find what validation is failing / error is being thrown?
i'm here in debugger, it's returning 0 and not throwing an error
Copy code
try { paymentRecord.save(); } catch(e) { e.toJSON() }
=> 0
I can do like
Copy code
paymentRecord.id
=> 0
If i try to save the record again I get-
Copy code
try { paymentRecord.save(); } catch(e) { e.toJSON() }
=> {type: "error.SuiteScriptError", name: "RCRD_DSNT_EXIST", message: "That record does not exist.", id: "0", stack: Array(1), …}
which doesn't give me any additional info