Yes, I’m afraid this is the entirely wrong approach, and if you are using this approach for all of the curriculum then you’re probably going to have to redo most everything.
As an example of why this is wrong:
say I want to add the track “Livin’ on a Prayer” to the album “Slippery When Wet”
updateRecords(2548, "tracks", "Livin' on a Prayer")
That should work, but your solution doesn’t allow me to do that. That’s because your solution is incorrect.
The tests are there to make sure your code works. You’re kinda missing the point of programming with your answer: you’ll pass the tests, but that’s it, you aren’t really doing any programming. The function needs to work for anything, not just the tiny sample of things in the tests.