Q: Unlock doors & liftgate on 2005 Buick Terraza

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
My doors, sliding doors and liftgate work perfectly probably 80% of the time, such as when you shift to drive, the doors lock and when you shift to park, they unlock.
When the above doesn't occur, only the driver side lock works by either the door lock switch and the remote, but the other doors will not work. I can drive 10 miles and they again work perfectly. This is a real problem when you need to unload cargo and the liftdoor doesn't work. I might guess that the system needs reprogramming, but I don't have the proceedure to do it.
(1) Answer
it is possiable you need to clean contacts in door. They are easy to reach and just clean with light sandpaper.