UD Field use in customization

I posted this a while ago. Maybe it will work for you.