Ok, this one's absolutely messing with my mind ......
# suitescript
p
Ok, this one's absolutely messing with my mind ... Has anyone come across this: Create a custom record, saved into a variable, like rec At the end, call var id = rec.save(); At this point, we can see id has a number, say 10. But the highest internal id for that record type, even before we ran this, is higher than that, and if we look for a record with the id of 10, it doesn't exist?
s
The only reason I can think that might be happening is if
rec
was assigned somewhere else within your current scope, and it’s not actually your custom record? - I would try this function in a separate script and see if you can reproduce as a stand-alone… Then, if it’s reproducible you’ll probably want to call support. 😕
p
Thanks SuiteDev. Pretty sure I'e not overwritten the variable. I've shored it up by checking if it exists after using search.lookupFields, but yeah I thinkit might be a support ticket