Just to clear up a possible misconception here. IMO storing a compass in a metal box, tin etc will not affect its accuracy.
When you are taking a bearing, keep away from magnets, power lines and metal objects including vehicles, fence lines, railway lines, water tanks and so on, as the compass' magnetic field will be attracted to these and give you a false reading. About 10 feet is usually far enough away from large objects, more if you want to be certain.
A common magnetic source that many forget about is a radio handset clipped to your shoulder area. Handsets have a magnet built in them that can seriously distort your bearing. If you have a radio with you, tuck the handset in the back of your shirt while using the compass.
Cellphones also have a built in magnet, keep the cell in your pants pocket and there shouldn't be a problem when sighting the compass