@henryl64 There is a hormone based spray that you can buy, you spray it outside where you want dog to toilet, encourage them to sniff it, and it will know to go there.
There's no point telling it off for going inside when it isn't let out, its not fair on the dog, and no point, but taking it...