We have a UE script that does logic for amortizati...
# suitescript
t
We have a UE script that does logic for amortization schedules. Since these details are only available after the record is saved we need to reload the record in an aftersubmit. Its not efficient or nice but its how things need to be done here otherwise the values we need aren't populated yet. Only issue is that NetSuite isn't giving the right id in the script context object. When we try to reload the record it just saved it gives us an error saying the record it just saved doesn't exist. If you look at my screenshot then you'll see the top log on the left details there is an error on line 80 and in the code its reloading the record it just created. If you are curious, the id is simply off. If the id is 27469 in the logs / code, we'll find its actually 27470 in the UI and that 27469 doesn't exist TLDR; Netsuite scriptcontext.newRecord.id is giving us an incorrect value that is different from what is created in the UI and throws an error. I heavily suspect this is a 2.1 error as I haven't encountered this before and all new bugs seem to stem from that