I know the foreclosure that is 12 years old should not still appear on your credit reports. If it appears on your credit reports, then I would suggest you dispute it. Learn how to dispute credit report mistakes here.
But I have no idea how to get it out of the court records - or even whether that's even possible. I would recommend you talk to the court that lists the foreclosure, and if you can't get the answer from them, then I would call a local title company and ask them for advice.