How can I get the submission ID in a custom submit handler? I have added a submission handler in a .module file to execute some custom code when a webform is submitted.
function mh_newsletter_form_alter(&amp;$form, $form_state, $form_id) {
  if ($form_id == 'webform_submission_newsletter_node_26_add_form') {
    $form['#validate'][] = 'mh_newsletter_form_validate';
    $form['actions']['submit']['#submit'][] = 'mh_newsletter_form_submit';
  }
}

function mh_newsletter_form_submit($form, &amp;$form_state) {
  // Custom code
}

I'm unable to access the webform submission ID. How can I get that value?
To get the webform submission ID in a custom form handler, I used the following code.
function MODULE_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if ($form_id== 'webform_submission_add_form') {
    $form['actions']['submit']['#submit'][] = 'MODULE_custom_submit_handler';
  }
}

function MODULE_custom_submit_handler(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state) {
  $webform_submission_id = $form_state-&gt;getFormObject()-&gt;getEntity()-&gt;id();
 }