Preheat the oven to 350°F.
Combine sour cream, soup, and butter in a bowl. Mix it well. Add salt, onion, and cheese to this mixture and mix until all combined.
Add potatoes and ham to mixture and stir until all combined. Place in 9×13 pan.
Sprinkle on butter covered crushed corn flakes. Bake uncovered for 40-50 minutes.