Hi, How can validate expense sublist using saveRec...
# suitescript
t
Hi, How can validate expense sublist using saveRecord ? I know how to iterate over that sublist but I am having problem with returning true/false since I am using currentRecord.get.promise().
b
the answer is not to use currentRecord.get
The saveRecord parameters includes the currentRecord
t
@battk Thank you very much for your prompt response. That is a script attached to the form and it's SS 2.1
function saveRecord(scriptContext) { console.log(
scriptContext.currentRecord: ${JSON.stringify(scriptContext.currentRecord)}
)
this throws error that currentRecord is undefined
the best part, when I switched the SS version to 2.x it's not undefined anymore...
b
probably just want to log scriptContext to the console