Stains inside the dishwasher are usually caused by the discolored tubes or the hardness of the water (white mineral build-up).
Make sure that silver does not come into touch throughout the wash process in order to avoid stains.
It is recommended to use a dishwasher cleaner to remove or to get rid of all water hardness stains, which breaks down and eliminates such white mineral aggregation.