OnLoad Hide Close Option from State field in Incident table

  • Navigate to System Defnition -> Client Script.
  • Click New.
      • Table: Incident
      • UI Type: All
      • Type: OnLoad

    function onLoad() {
    //Type appropriate comment here, and begin script below
    g_form.removeOption('state', '7');
    }

OnChange Hide Closed option when Contact type is email and when Contact type is phone hide resolved option from State field in Incident table

  • Navigate to System Defnition -> Client Script.
  • Click New.
      • Table: Incident
      • UI Type: All
      • Type: OnChange

    function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === 'email') {
    g_form.removeOption('state', '7');
    return;
    }
    if (isLoading || newValue === 'phone') {
    g_form.removeOption('state', '6');
    return;
    }
    }