I took my basset puppy outside to the kitchen yard constantly, and did the squeaky 'wee, please' thing, plus treats, etc. He then learned that wees happened outside, and to get outside he needed to go through the door, and if the door was shut, bashing his mighty paw against it would result in it being opened before he took another layer of paint off or put his paw through the glass.
In an unusually logical thought progression for a basset hound, he seems to have learned that, if he's not in the kitchen with access to the yard, bashing on any available door will result in me getting up, and then he'll trot through to the kitchen to be let out there.
I think I could teach him to jangle a bell suspended from the door handle, but frankly that would just result in both dogs using it as a means of summoning the Food Girl, and my life would be even more Downton Abbey than it already is. I never realised that I'd end up in service to a pair of dogs.