I want to create a new record, them copy some date...
# suitescript
e
I want to create a new record, them copy some date to that record, and remove it from the previous record. If that last remove failed, my data will be duplicated. Is there any transaction I could use?
s
no
b
the only transactional processing capability in netsuite is parent/child relationships involving custom records
w
You could potentially create record but don’t save. The try{} remove date from old. If good add date to new and save new. Do the last part in try/catch and on catch reapply date to first. Not fool proof but goes long way. And linked ids in each record and create saved search showing ones that are bad and add reminder to search to clean up bad ones. It’s a Lot but might result in less bad data
e
Thanks