There are generally two texts for the last bracha of Shmoneh Esrei - one beginning Sim Shalom, and one that starts Shalom Rav. There are different customs for when each is said.
If someone says the wrong one according to his custom (e.g. Sim Shalom at Shabbat Mincha outside of Israel) but would be correct according to a different custom (inside Israel) - what should be done?
What about if someone says the wrong one according to all customs (e.g. Shalom Rav at Shacharit)?