As we all know, or you'll soon learn, dogs aren't known to generalize behaviors we want - this includes "knowing" the proper place to go potty. Sure, they've learned where to go where they live, but often times when you take them to a new location, they need to be re-taught. And, sometimes you need to re-teach those skills in even where they live.
House-training basics should be instilled whenever a dog goes to a new place. Meaning, take the dog where you want him or her to eliminate, wait until they do just that, then reward them - using a yummy treat, petting, praise, and allowing them either freedom off the leash or getting to go inside the house/building etc... With consistency, the dog will learn that the trend of going outside is the better choice.
I have my students use this approach whenever they bring their dog to my Inquisitive Canine studio for classes or socials. Their dog is to go potty outside, and the reward is a treat and getting to come in for class. The first couple of times take a little longer (this is why I ask folks to arrive early), but once the dog "gets it", they're more likely to get their business done so they can come in for class. It's nice to see pooches that excited about going to school.
One other topic I'll mention regarding house-training is "texture" or "substrate" of the type of surface where a dog will usually eliminate. If they're used to a specific surface, then it changes, they might be "confused" and not "go potty" immediately. Take for instance wet grass vs dry. It's been raining out here (finally), so getting dogs out into the rain to potty may be a whole new experience for them - you might need to get out the treats, leash (to manage them from wandering off exploring other things) and take them outside yourself. Using some of your basic house-training techniques will help set them up for success - and help prevent you having to clean up.