Not a secret procedure as far as I'm aware, if the feature is available then it should be in the steering wheel menus.
Press < or > to get to Settings
Then up or down to get to Vehicle, then OK to confirm.
Up or down again to get to Auto Door Lock and set it how you want it, confirming with OK.
The above is how it works on mine, yours may be different but hopefully similar.