Case Updates not saving text

Whenever I enter some text and save it in case updates thread…it says one moment please and that’s it…Nothing is saved.???

I have the latest version of the SuiteCRM

Hi. Just tell us which version you have, there are three branches of SuiteCRM, each has a “latest version”: 7.8.16, 7.9.15, 7.10.1

Is this a new installation or are you coming from successive upgrades? What was the first version you installed.

(I have seen your issue before, I am just gathering info to help you)

1 Like

I was using 7.9 and upgraded to 7.10.1. It does not work on either of them.

The problem that I knew of affected people coming from older versions, so this might be different.

Do you see any errors in suitecrm.log or php_errrors.log at the time of that failed case update?

no errors…

Hou other version problems were solved??

Basically there’s a logic hook that needs to be triggered for this to work. Sometimes customizations made on your system can break this mechanism.

It’s a long read, but here is everything you need to know:

https://github.com/salesagility/SuiteCRM/issues/2237

2 Likes

which directory is to be edited with the hook… I am tad bit confused

If you have anything in

custom/modules/Cases/metadata

I would try moving it somewhere else (as a backup) and leaving that directory empty. you might break some customizations you previously made in Cases module (if you have any), but at least you can see if that is causing your problem.

There is no directory with name “metadata” in custom/modules/Cases. It is only up to custom/modules/Cases

Also what does this convey…

##…Hi guys, so I just solved this issue.

Problem is next:
file: /modules/AOP_Case_Updates/Case_Updates.php
line: 120
‘’’ html
$("#LBL_AOP_CASE_UPDATES").load(“index.php?module=Cases&action=DetailView&record=”+record + " #LBL_AOP_CASE_UPDATES", function(){
‘’’
This “#LBL_AOP_CASE_UPDATES” is not in /custom -> detailviewdefs.php if you have an older version of CRM updated to new one.
So to make it work, open /custom/modules/Cases/metadata/detailviewdefs.php; and find your panel definition and change it to LBL_AOP_CASE_UPDATES.

Hope this help someone…####

What do you have in

modules/Cases/metadata/detailviewdefs.php

Please paste the full contents inside the forum’s “code” tags (it’s easy, there’s a button on the toolbar when replying, saying “Code”).

1 Like
 
$viewdefs ['Cases'] = 
array (
  'DetailView' => 
  array (
    'templateMeta' => 
    array (
      'form' => 
      array (
        'buttons' => 
        array (
          0 => 'EDIT',
          1 => 'DUPLICATE',
          2 => 'DELETE',
          3 => 'FIND_DUPLICATES',
        ),
      ),
      'maxColumns' => '2',
      'widths' => 
      array (
        0 => 
        array (
          'label' => '10',
          'field' => '30',
        ),
        1 => 
        array (
          'label' => '10',
          'field' => '30',
        ),
      ),
      'useTabs' => true,
      'tabDefs' => 
      array (
        'LBL_CASE_INFORMATION' => 
        array (
          'newTab' => true,
          'panelDefault' => 'expanded',
        ),
        'LBL_AOP_CASE_UPDATES' => 
        array (
          'newTab' => false,
          'panelDefault' => 'expanded',
        ),
      ),
    ),
    'panels' => 
    array (
      'lbl_case_information' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'case_number',
            'label' => 'LBL_CASE_NUMBER',
          ),
          1 => 'priority',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'state',
            'comment' => 'The state of the case (i.e. open/closed)',
            'label' => 'LBL_STATE',
          ),
          1 => 'status',
        ),
        2 => 
        array (
          0 => 'type',
          1 => 'account_name',
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'name',
            'label' => 'LBL_SUBJECT',
          ),
        ),
        4 => 
        array (
          0 => 'description',
        ),
        5 => 
        array (
          0 => 'resolution',
        ),
        6 => 
        array (
          0 => 
          array (
            'name' => 'assigned_user_name',
            'label' => 'LBL_ASSIGNED_TO',
          ),
        ),
        7 => 
        array (
          0 => 
          array (
            'name' => 'date_entered',
            'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
          ),
          1 => 
          array (
            'name' => 'date_modified',
            'label' => 'LBL_DATE_MODIFIED',
            'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
          ),
        ),
      ),
      'LBL_AOP_CASE_UPDATES' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'aop_case_updates_threaded',
            'studio' => 'visible',
            'label' => 'LBL_AOP_CASE_UPDATES_THREADED',
          ),
        ),
      ),
    ),
  ),
);


Sorry, but that looks right, and since you already said you don’t have a matching file in “custom” directory, that should be in effect.

Do you see any javascript errors in your browser’s developer console when you hit “save”?

On hitting the safe button it gives 2 errors…

  1. Refused to set unsafe header “Content-length”
  2. Refused to set unsafe header “Connection”

It looks like this is where that’s happening

https://github.com/salesagility/SuiteCRM/blob/master/modules/AOP_Case_Updates/Case_Updates.php#L113-L114

but that code is two years old, it seems to be working fine for everyone.

Can you try commenting-out those two lines, to see if it works?

Then post a new issue on GitHub explaining this, with the errors, and saying if it worked or not. Thanks

For anyone looking for the same issue:

if, correctly, in /custom/modules/Cases/metadata/detailviewdefs.php you have a panel named “LBL_AOP_CASE_UPDATES”
be sure to have AOP enabled on admin > AOP settings

2 Likes

I read on this forum that turning AOP off will stop the CRM from sending email.

That’s true.

But is also stopped the Case Updates from saving as above.

Hi I have the same problem but have a lot of customization

see code below

<?php
$viewdefs ['Cases'] = 
array (
  'DetailView' => 
  array (
    'templateMeta' => 
    array (
      'form' => 
      array (
        'buttons' => 
        array (
          0 => 'EDIT',
          1 => 'DUPLICATE',
          2 => 'DELETE',
          3 => 'FIND_DUPLICATES',
        ),
      ),
      'maxColumns' => '2',
      'widths' => 
      array (
        0 => 
        array (
          'label' => '10',
          'field' => '30',
        ),
        1 => 
        array (
          'label' => '10',
          'field' => '30',
        ),
      ),
      'useTabs' => false,
      'tabDefs' => 
      array (
        'LBL_CASE_INFORMATION' => 
        array (
          'newTab' => false,
          'panelDefault' => 'expanded',
        ),
        'LBL_EDITVIEW_PANEL3' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_DETAILVIEW_PANEL15' => 
        array (
          'newTab' => false,
          'panelDefault' => 'expanded',
        ),
        'LBL_DETAILVIEW_PANEL12' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_DETAILVIEW_PANEL13' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_DETAILVIEW_PANEL14' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL10' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL4' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL9' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL5' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL6' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL11' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL1' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL2' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL7' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
        'LBL_EDITVIEW_PANEL8' => 
        array (
          'newTab' => false,
          'panelDefault' => 'collapsed',
        ),
      ),
      'syncDetailEditViews' => false,
    ),
    'panels' => 
    array (
      'lbl_case_information' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'case_number',
            'label' => 'LBL_CASE_NUMBER',
          ),
          1 => 'priority',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'state',
            'comment' => 'The state of the case (i.e. open/closed)',
            'label' => 'LBL_STATE',
          ),
          1 => 'status',
        ),
        2 => 
        array (
          0 => 'type',
          1 => 'account_name',
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'billing_status_c',
            'studio' => 'visible',
            'label' => 'LBL_BILLING_STATUS',
          ),
          1 => 
          array (
            'name' => 'categories_c',
            'studio' => 'visible',
            'label' => 'LBL_CATEGORIES',
          ),
        ),
        4 => 
        array (
          0 => 
          array (
            'name' => 'name',
            'label' => 'LBL_SUBJECT',
          ),
        ),
        5 => 
        array (
          0 => 'description',
        ),
        6 => 
        array (
          0 => 'resolution',
          1 => 
          array (
            'name' => 'status_time_c',
            'label' => 'LBL_STATUS_TIME',
          ),
        ),
        7 => 
        array (
          0 => 
          array (
            'name' => 'resolution_date_c',
            'label' => 'LBL_RESOLUTION_DATE',
          ),
          1 => 
          array (
            'name' => 'days_to_resolution_c',
            'label' => 'LBL_DAYS_TO_RESOLUTION',
          ),
        ),
        8 => 
        array (
          0 => 
          array (
            'name' => 'days_open_c',
            'label' => 'LBL_DAYS_OPEN',
          ),
        ),
        9 => 
        array (
          0 => 
          array (
            'name' => 'created_by_name',
            'label' => 'LBL_CREATED',
          ),
          1 => 
          array (
            'name' => 'date_entered',
            'label' => 'LBL_CREATED',
          ),
        ),
        10 => 
        array (
          0 => 
          array (
            'name' => 'case_team_leader_c',
            'studio' => 'visible',
            'label' => 'LBL_CASE_TEAM_LEADER_C',
          ),
          1 => 
          array (
            'name' => 'case_current_kam_c',
            'studio' => 'visible',
            'label' => 'LBL_CASE_CURRENT_KAM',
          ),
        ),
        11 => 
        array (
          0 => 
          array (
            'name' => 'status_start_time_c',
            'label' => 'LBL_STATUS_START_TIME_C',
          ),
        ),
        12 => 
        array (
          0 => 
          array (
            'name' => 'assigned_user_name',
            'label' => 'LBL_ASSIGNED_TO',
          ),
          1 => 
          array (
            'name' => 'followup_deadline_c',
            'label' => 'LBL_FOLLOWUP_DEADLINE',
          ),
        ),
      ),
      'lbl_editview_panel3' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'aop_case_updates_threaded',
            'studio' => 'visible',
            'label' => 'LBL_AOP_CASE_UPDATES_THREADED',
          ),
          1 => '',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'date_modified',
            'label' => 'LBL_DATE_MODIFIED',
            'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
          ),
        ),
      ),
      'lbl_detailview_panel15' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'rq_account_number_c',
            'label' => 'LBL_RQ_ACCOUNT_NUMBER',
          ),
          1 => 
          array (
            'name' => 'rq_patient_details_c',
            'label' => 'LBL_RQ_PATIENT_DETAILS',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'rq_service_date_c',
            'label' => 'LBL_RQ_SERVICE_DATE',
          ),
          1 => '',
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'rq_icd_10_code_c',
            'label' => 'LBL_RQ_ICD_10_CODE',
          ),
          1 => 
          array (
            'name' => 'rq_procedure_codes_c',
            'label' => 'LBL_RQ_PROCEDURE_CODES',
          ),
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'rq_rand_value_c',
            'label' => 'LBL_RQ_RAND_VALUE',
          ),
          1 => 
          array (
            'name' => 'rq_medical_scheme_c',
            'label' => 'LBL_RQ_MEDICAL_SCHEME',
          ),
        ),
      ),
      'lbl_detailview_panel12' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'number_of_invoices_c',
            'label' => 'LBL_NUMBER_OF_INVOICES',
          ),
          1 => 
          array (
            'name' => 'patients_loaded_c',
            'label' => 'LBL_PATIENTS_LOADED',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'completed_invoices_c',
            'label' => 'LBL_COMPLETED_INVOICES',
          ),
          1 => 
          array (
            'name' => 'out_inv_c',
            'label' => 'LBL_OUT_INV_C',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'oldest_invoice_date_c',
            'label' => 'LBL_OLDEST_INVOICE_DATE',
          ),
          1 => '',
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'kam_notes_c',
            'studio' => 'visible',
            'label' => 'LBL_KAM_NOTES',
          ),
          1 => 
          array (
            'name' => 'inv_ref_c',
            'studio' => 'visible',
            'label' => 'LBL_INV_REF_C',
          ),
        ),
      ),
      'lbl_detailview_panel13' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'title_c',
            'studio' => 'visible',
            'label' => 'LBL_TITLE',
          ),
          1 => 
          array (
            'name' => 'initials_c',
            'label' => 'LBL_INITIALS',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'patient_first_name_c',
            'label' => 'LBL_PATIENT_FIRST_NAME',
          ),
          1 => 
          array (
            'name' => 'patient_last_name_c',
            'label' => 'LBL_PATIENT_LAST_NAME',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'patient_id_c',
            'label' => 'LBL_PATIENT_ID',
          ),
          1 => 
          array (
            'name' => 'pat_contact_no_c',
            'label' => 'LBL_PAT_CONTACT_NO',
          ),
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'pat_email_c',
            'label' => 'LBL_PAT_EMAIL',
          ),
          1 => 
          array (
            'name' => 'jjwg_maps_address_c',
            'label' => 'LBL_JJWG_MAPS_ADDRESS',
          ),
        ),
        4 => 
        array (
          0 => 
          array (
            'name' => 'pat_med_details_c',
            'label' => 'LBL_PAT_MED_DETAILS',
          ),
          1 => 
          array (
            'name' => 'pat_med_no_c',
            'label' => 'LBL_PAT_MED_NO',
          ),
        ),
      ),
      'lbl_detailview_panel14' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'dos_c',
            'label' => 'LBL_DOS',
          ),
          1 => 
          array (
            'name' => 'icd10_c',
            'label' => 'LBL_ ICD10',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'procedures_c',
            'label' => 'LBL_ PROCEDURES',
          ),
          1 => '',
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'additional_notes_c',
            'studio' => 'visible',
            'label' => 'LBL_ADDITIONAL_NOTES',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel10' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'monitor_c',
            'studio' => 'visible',
            'label' => 'LBL_MONITOR',
          ),
          1 => 
          array (
            'name' => 'monitor_2_c',
            'studio' => 'visible',
            'label' => 'LBL_MONITOR_2',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'monitor_3_c',
            'studio' => 'visible',
            'label' => 'LBL_MONITOR_3',
          ),
          1 => 
          array (
            'name' => 'monitor_4_c',
            'studio' => 'visible',
            'label' => 'LBL_MONITOR_4',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'monitor_5_c',
            'studio' => 'visible',
            'label' => 'LBL_MONITOR_5',
          ),
          1 => 
          array (
            'name' => 'monitor_6_c',
            'studio' => 'visible',
            'label' => 'LBL_MONITOR_6',
          ),
        ),
      ),
      'lbl_editview_panel4' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'bank_name_c',
            'label' => 'LBL_BANK_NAME',
          ),
          1 => 
          array (
            'name' => 'contract_percentage_c',
            'studio' => 'visible',
            'label' => 'LBL_CONTRACT_PERCENTAGE',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'bank_details_registered_c',
            'studio' => 'visible',
            'label' => 'LBL_BANK_DETAILS_REGISTERED',
          ),
          1 => 
          array (
            'name' => 'special_notes_c',
            'label' => 'LBL_SPECIAL_NOTES',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'setup_form_with_dr_c',
            'studio' => 'visible',
            'label' => 'LBL_SETUP_FORM_WITH_DR',
          ),
          1 => 
          array (
            'name' => 'accept_wca_c',
            'studio' => 'visible',
            'label' => 'LBL_ACCEPT_WCA',
          ),
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'nr_of_add_users_c',
            'studio' => 'visible',
            'label' => 'LBL_NR_OF_ADD_USERS',
          ),
          1 => 
          array (
            'name' => 'old_debt_c',
            'studio' => 'visible',
            'label' => 'LBL_OLD_DEBT',
          ),
        ),
        4 => 
        array (
          0 => 
          array (
            'name' => 'paying_monthly_system_fee_c',
            'studio' => 'visible',
            'label' => 'LBL_PAYING_MONTHLY_SYSTEM_FEE',
          ),
          1 => 
          array (
            'name' => 'client_expectations_c',
            'label' => 'LBL_CLIENT_EXPECTATIONS',
          ),
        ),
        5 => 
        array (
          0 => 
          array (
            'name' => 'vat_registered_c',
            'studio' => 'visible',
            'label' => 'LBL_VAT_REGISTERED',
          ),
          1 => 
          array (
            'name' => 'requested_start_date_c',
            'label' => 'LBL_REQUESTED_START_DATE',
          ),
        ),
        6 => 
        array (
          0 => 
          array (
            'name' => 'training_site_client_tr_c',
            'studio' => 'visible',
            'label' => 'LBL_TRAINING_SITE_CLIENT_TR',
          ),
          1 => 
          array (
            'name' => 'monthly_turnover_c',
            'label' => 'LBL_MONTHLY_TURNOVER',
          ),
        ),
      ),
      'lbl_editview_panel9' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'sales_sent_c',
            'studio' => 'visible',
            'label' => 'LBL_SALES_SENT',
          ),
          1 => '',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'cs_received_c',
            'studio' => 'visible',
            'label' => 'LBL_CS_RECEIVED',
          ),
          1 => '',
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'sent_by_c',
            'label' => 'LBL_SENT_BY',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel5' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'alpha_test_louise_c',
            'studio' => 'visible',
            'label' => 'LBL_ALPHA_TEST_LOUISE',
          ),
          1 => '',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'beta_test_cs_c',
            'studio' => 'visible',
            'label' => 'LBL_BETA_TEST_CS',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel6' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'goodxweb_alpha_test_louise_c',
            'studio' => 'visible',
            'label' => 'LBL_GOODXWEB_ALPHA_TEST_LOUISE',
          ),
          1 => '',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'goodxweb_beta_test_louise_c',
            'studio' => 'visible',
            'label' => 'LBL_GOODXWEB_BETA_TEST_LOUISE',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel11' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'icu_checklist_c',
            'studio' => 'visible',
            'label' => 'LBL_ICU_CHECKLIST',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'medical_aids_checked_c',
            'studio' => 'visible',
            'label' => 'LBL_MEDICAL_AIDS_CHECKED',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'icu_discharge_procedure_c',
            'studio' => 'visible',
            'label' => 'LBL_ICU_DISCHARGE_PROCEDURE',
          ),
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'handed_over_date_c',
            'label' => 'LBL_HANDED_OVER_DATE',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel1' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'training_date_c',
            'label' => 'LBL_TRAINING_DATE',
          ),
          1 => 
          array (
            'name' => 'training_site_c',
            'label' => 'LBL_TRAINING_SITE',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'food_beverages_c',
            'label' => 'LBL_FOOD_BEVERAGES',
          ),
          1 => 
          array (
            'name' => 'accommodation_c',
            'label' => 'LBL_ACCOMMODATION',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'travel_cost_c',
            'label' => 'LBL_TRAVEL_COST',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel2' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'billing_type_c',
            'studio' => 'visible',
            'label' => 'LBL_BILLING_TYPE',
          ),
          1 => '',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'billing_rate_c',
            'label' => 'LBL_BILLING_RATE',
          ),
          1 => 
          array (
            'name' => 'billable_time_c',
            'label' => 'LBL_BILLABLE_TIME',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'case_fee_c',
            'label' => 'LBL_CASE_FEE',
          ),
          1 => '',
        ),
      ),
      'lbl_editview_panel7' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'start_date_c',
            'label' => 'LBL_START_DATE',
          ),
          1 => 
          array (
            'name' => 'goodx_training_cloud_usernam_c',
            'studio' => 'visible',
            'label' => 'LBL_GOODX_TRAINING_CLOUD_USERNAM',
          ),
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'job_tile_c',
            'label' => 'LBL_JOB_TILE',
          ),
          1 => 
          array (
            'name' => 'accounts_training_c',
            'studio' => 'visible',
            'label' => 'LBL_ACCOUNTS_TRAINING',
          ),
        ),
        2 => 
        array (
          0 => 
          array (
            'name' => 'department_c',
            'label' => 'LBL_DEPARTMENT',
          ),
          1 => 
          array (
            'name' => 'billing_training_c',
            'studio' => 'visible',
            'label' => 'LBL_BILLING_TRAINING',
          ),
        ),
        3 => 
        array (
          0 => 
          array (
            'name' => 'office_location_c',
            'studio' => 'visible',
            'label' => 'LBL_OFFICE_LOCATION',
          ),
          1 => 
          array (
            'name' => 'billing_assessment_date_c',
            'label' => 'LBL_BILLING_ASSESSMENT_DATE',
          ),
        ),
        4 => 
        array (
          0 => 
          array (
            'name' => 'induction_date_c',
            'label' => 'LBL_INDUCTION_DATE',
          ),
          1 => 
          array (
            'name' => 'billing_training_percentage_c',
            'label' => 'LBL_BILLING_TRAINING_PERCENTAGE',
          ),
        ),
        5 => 
        array (
          0 => 
          array (
            'name' => 'induction_c',
            'studio' => 'visible',
            'label' => 'LBL_INDUCTION',
          ),
          1 => 
          array (
            'name' => 'sales_training_c',
            'studio' => 'visible',
            'label' => 'LBL_SALES_TRAINING',
          ),
        ),
        6 => 
        array (
          0 => 
          array (
            'name' => 'introduction_c',
            'studio' => 'visible',
            'label' => 'LBL_INTRODUCTION',
          ),
          1 => 
          array (
            'name' => 'date_from_c',
            'label' => 'LBL_DATE_FROM',
          ),
        ),
        7 => 
        array (
          0 => 
          array (
            'name' => 'business_communication_c',
            'studio' => 'visible',
            'label' => 'LBL_BUSINESS_COMMUNICATION',
          ),
          1 => 
          array (
            'name' => 'date_to_c',
            'label' => 'LBL_DATE_TO',
          ),
        ),
        8 => 
        array (
          0 => 
          array (
            'name' => 'crm_training_c',
            'studio' => 'visible',
            'label' => 'LBL_CRM_TRAINING',
          ),
          1 => 
          array (
            'name' => 'level_one_training_date_c',
            'label' => 'LBL_LEVEL_ONE_TRAINING_DATE',
          ),
        ),
        9 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_one_completed_c',
            'studio' => 'visible',
            'label' => 'LBL_LEVEL_ONE_COMPLETED',
          ),
        ),
        10 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_two_training_date_c',
            'label' => 'LBL_LEVEL_TWO_TRAINING_DATE',
          ),
        ),
        11 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_two_training_completed_c',
            'studio' => 'visible',
            'label' => 'LBL_LEVEL_TWO_TRAINING_COMPLETED',
          ),
        ),
        12 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_three_training_date_c',
            'label' => 'LBL_LEVEL_THREE_TRAINING_DATE',
          ),
        ),
        13 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_three_training_complet_c',
            'studio' => 'visible',
            'label' => 'LBL_LEVEL_THREE_TRAINING_COMPLET',
          ),
        ),
        14 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'accounts_assess_one_c',
            'label' => 'LBL_ACCOUNTS_ASSESS_ONE',
          ),
        ),
        15 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'accounts_assessment_one_per_c',
            'label' => 'LBL_ACCOUNTS_ASSESSMENT_ONE_PER',
          ),
        ),
        16 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'accounts_assess_two_c',
            'label' => 'LBL_ACCOUNTS_ASSESS_TWO',
          ),
        ),
        17 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'accounts_assess_two_per_c',
            'label' => 'LBL_ACCOUNTS_ASSESS_TWO_PER',
          ),
        ),
        18 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_four_assessment_date_c',
            'label' => 'LBL_LEVEL_FOUR_ASSESSMENT_DATE',
          ),
        ),
        19 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_four_training_passed_c',
            'studio' => 'visible',
            'label' => 'LBL_LEVEL_FOUR_TRAINING_PASSED',
          ),
        ),
        20 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_four_theory_per_c',
            'label' => 'LBL_LEVEL_FOUR_THEORY_PER',
          ),
        ),
        21 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_four_practical_passed_c',
            'studio' => 'visible',
            'label' => 'LBL_LEVEL_FOUR_PRACTICAL_PASSED',
          ),
        ),
        22 => 
        array (
          0 => '',
          1 => 
          array (
            'name' => 'level_four_practical_per_c',
            'label' => 'LBL_LEVEL_FOUR_PRACTICAL_PER',
          ),
        ),
      ),
      'lbl_editview_panel8' => 
      array (
        0 => 
        array (
          0 => 
          array (
            'name' => 'goodx_louise_c',
            'studio' => 'visible',
            'label' => 'LBL_GOODX_LOUISE',
          ),
          1 => '',
        ),
        1 => 
        array (
          0 => 
          array (
            'name' => 'it_c',
            'studio' => 'visible',
            'label' => 'LBL_IT',
          ),
          1 => '',
        ),
      ),
    ),
  ),
);
;
?>

If I copy /SuiteCRM/SuiteCRM-7.11.13/modules/Cases/metadata/detailviewdefs.php to /SuiteCRM/SuiteCRM-7.11.13/custom/modules/Cases/metadata/detailviewdefs.php then it works

how can I merge code without loosing Costum fields

Or could someone point out what needs to change in the code