The code comes from the first Super Granny, not the fourth. Reach level 100 there, copy the code onto a jump drive, then transfer it into Super Granny 4.
Once it's in, you'll need your wand to fend off the gnomes that come after you — that's what the transfer triggers. Clear them and the code for Super Granny 4 unlocks. Good luck with the gnomes, the dogs and those crooked judges, and don't be late for sewing class.