The code you gave me was a start but the slug was missing. This solves that:
add_action( 'rwmb_announcement-cf_after_save_post', 'update_post_title' );
function update_post_title( $post_id ) {
// Get the field value
$my_new_post_title = rwmb_meta( 'announcement_title', '', $post_id );
// generate new post post_slug
$delimiter = "-";
$unwanted_array = ['ś'=>'s', 'ą' => 'a', 'ć' => 'c', 'ç' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ź' => 'z', 'ż' => 'z',
'Ś'=>'s', 'Ą' => 'a', 'Ć' => 'c', 'Ç' => 'c', 'Ę' => 'e', 'Ł' => 'l', 'Ń' => 'n', 'Ó' => 'o', 'Ź' => 'z', 'Ż' => 'z',]; // Polish letters for example
$str = strtr( $str, $unwanted_array );
$slug = strtolower(trim(preg_replace('/[\s-]+/', $delimiter, preg_replace('/[^A-Za-z0-9-]+/', $delimiter, preg_replace('/[&]/', 'and', preg_replace('/[\']/', '', iconv('UTF-8', 'ASCII//TRANSLIT', $str))))), $delimiter));
// Preprare update post
$my_post = array(
'ID' => $post_id,
'post_title' => $my_new_post_title,
'post_name' => $slug,
);
wp_update_post( $my_post );
}
Modify the "Unwanted" as you wish of course!