Add Custom Button to EditView

Trying to add a custom button to EditView of the cases module code below is not working for me.

I have noted that the default output of $viewdefs doesn’t contain the buttons array, so i am not how to override these buttons

/custom/modules/Cases/metadata/editviewdefs.php


$viewdefs['Cases']['EditView']['templateMeta']['form']['buttons'][0] = array (
  'customCode' => "<input title=\"Save\" type=\"submit\" name=\"button\" value=\"Save\" id=\"SAVE\">",
);



$viewdefs['Cases']['EditView']['templateMeta']['form']['buttons'][1] = array (
  'customCode' => "<input title=\"Cancel [Ctrl+Opsst+l]\" type=\"submit\" name=\"button\" value=\"Cancel\" id=\"CANCEL\">",
);

$viewdefs['Cases']['EditView']['templateMeta']['form']['buttons'][2] = array (
  'customCode' => "<input title=\"CUSTOM BUTTON\" type=\"submit\" name=\"button\" value=\"SendSMS\" id=\"CUSTOMBUTTON\">",
);

How do i override the SAVE & CANCEL buttons & add a 3rd Custom Button

Quick Repair sorted my issue