Not all hamsters are completely toilet trained, but they do choose certain spots to use the bathroom. If you found out where they are, then you should place a sand bath (or whatever you want him to go to the bathroom in) there. Then, once they are used to use the toilet in there, you could move it wherever you originally wanted their toilet to be.
-Hammie Heart