Is it necessary to be in your home country for saudi residence visa

If I go to another country on tourist visa, can I get my Saudi residence visa processed in that country or is it necessary for me to do the visa processing in my home country.

As far as I know; you have to be in your home country for Saudi visa processing.

The only exceptions that I have come across are (people who have done that in my company)

1) If you are already a resident in another GCC country like UAE etc but that also depends upon the relative standing of your sponsor in Saudi
2) If you are the in US and a legal resident (Green card holder)

Thanks for the information...