Plugin allows to use post's custom fields values in permalink structure by adding %field_fieldname%, for posts, pages and custom post types.
wpcfp_get_post_metadata_single
generate_dynamic_metadata