My boy can be a little bit of a 'picky pooper', but in general he's very good. He goes both outside during walks and in the litter box indoors (yes, a little trained dog!) when he needs to go but can't get out on a walk for whatever reason. The only time we really have issues is when there are unfamiliar people looking after him for any period of time. If we go away for a few days and leave him with a pet sitter, we've been told by multiple sitters that he has refused to do his business. Same when we have left him at kennels; he just doesn't like pooping when people he doesn't know are around for some reason. As long as myself, one of my parents, or another person he recognizes as family is around him though, he is generally fine.
When he uses the litter box, though, sometimes he makes the cat not want to use it. She wants her own place, but the dog will only use the litter box if it is the same one that the cat uses! We tried setting up a different one for him but he always switches back to the cat's, even if the cat gets fed up and uses the clean one. It is a little frustrating, but the cat seems to be putting up with it now.