Good advice. I'd also suggest a couple of other things to try should dogodad's advice not work, which most likely it will. Go outside about every two hours to start. When they start to go, immediately give a command to "break" or whatever word is easy and comfortable for you to use and that they understand. After they go, praise them and maybe give a reward at first. Do this consistently. After a week or so, start lengthening the times between breaks. Keep a close eye on them. If you catch them going inside, give immediate correction with a big loud fuss and take them outside. They'll be freaked out by the correction, so wait until they calm down and go to the bathroom outside, follow it with a ton of praise, make a big spectacle about them going outside. Then do it all over again. Do not, do not, do not correct if they've went inside and you didn't catch them redhanded. If you come home and find a pile, clean it up and remember to give them a break next time before you leave. Dogs aren't perfect and they don't have an easy time associating their past actions with your current ones. Associating their restroom breaks with your command and you only giving that command outside may work. It's a little stricter for dogs that don't quite get the hint.
This may be controversial, but forcing a bad behavior to correct bad behavior is sometimes a good method but you need to be confident and knowledgable with how and when you're doing it. If the dog is pissing inside while you're gone for short amounts of time (like an hour) and you gave them a break before you left, but not when you're at home would be a good example. Keep them inside for a long time until they feel the need to piss in front of you. Correct them, take them outside, give the command, and praise them like there's no tomorrow after they piss outside. Training methods vary with the dog and specific circumstances. Just my two cents. Opinions vary, good luck.