Case line items on create view

I'm currently in the proces of doing an upgrade van 7.6 to 7.9.3 and almost all things seem to be working ( with a little bit of development here and there). One of the things that I still cant seem to migrate is the method for adding case line items in the create view of the case module. 

In 7.6 we have added a 'simple' subpanels-create layout to the create-actions view def. At first after upgrading I noticed that only the case line items where showing. I thought this was because of the fact that the create-actions view doesn't exist anymore ( I thought I read it somewhere ) in 7.9.x. 

So I recreated the viewdefs so it uses the create view and the subpanels-create layout. like this: 

 array(         array(             'layout' => array(                 'type' => 'default',                 'name' => 'sidebar',                 'components' => array(                     array(                         'layout' => array(                             'type' => 'base',                             'name' => 'main-pane',                             'css_class' => 'main-pane span8',                             'components' => array(                                 array(                                     'view' => 'create',                                 ),                                 array(                                     'layout' => 'subpanels-create',                                 ),                             ),                         ),                     ),                     array(                         'layout' => array(                             'type' => 'base',                             'name' => 'preview-pane',                             'css_class' => 'preview-pane',                             'components' => array(                                 array(                                     'layout' => 'preview',                                 ),                             ),                         ),                     ),                 ),                 'last_state' => array(                     'id' => 'create-default',                 ),             ),         ),     ), );

Its almost working. For some reason the header of the subpanel create ( which is a case line item subpanel ) does show but no content (edit mode) is shown. 

Someone got a clue on what would cause this behavior?

Parents Reply Children
  • Currently the relationship fields in the custom/metadata/<relationship>MetaData.php must be indexed by theirs own names instead of by numbers.

    Can you kindly share the related scripts you built for Cases subpanels-create under Cases? Additionally share the vardefs/relationship definitions for custom Cases x Cases relationship.

    Cheers

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • The content of the vardef  for caselineitems_cases

    $dictionary["Case"]["fields"]["cli_caselineitems_cases"] = array (
      'name' => 'cli_caselineitems_cases',
      'type' => 'link',
      'relationship' => 'cli_caselineitems_cases',
      'source' => 'non-db',
      'module' => 'cli_CaseLineItems',
      'bean_name' => 'cli_CaseLineItems',
      'vname' => 'LBL_CLI_CASELINEITEMS_CASES_FROM_CASES_TITLE',
      'id_name' => 'cli_caselineitems_casescases_ida',
      'link-type' => 'many',
      'side' => 'left',
    );

    the content of the meta data file for the relationship metadata file:

    <?php
    // created: 2018-02-23 15:08:17
    $dictionary['cli_caselineitems_cases'] = array (
      'true_relationship_type' => 'one-to-many',
      'relationships' =>
      array (
        'cli_caselineitems_cases' =>
        array (
          'lhs_module' => 'Cases',
          'lhs_table' => 'cases',
          'lhs_key' => 'id',
          'rhs_module' => 'cli_CaseLineItems',
          'rhs_table' => 'cli_caselineitems',
          'rhs_key' => 'id',
          'relationship_type' => 'many-to-many',
          'join_table' => 'cli_caselineitems_cases_c',
          'join_key_lhs' => 'cli_caselineitems_casescases_ida',
          'join_key_rhs' => 'cli_caselineitems_casescli_caselineitems_idb',
        ),
      ),
      'table' => 'cli_caselineitems_cases_c',
      'fields' =>
      array (
        'id' =>
        array (
          'name' => 'id',
          'type' => 'varchar',
          'len' => 36,
        ),
        'date_modified' =>
        array (
          'name' => 'date_modified',
          'type' => 'datetime',
        ),
        'deleted' =>
        array (
          'name' => 'deleted',
          'type' => 'bool',
          'len' => '1',
          'default' => '0',
          'required' => true,
        ),
        'cli_caselineitems_casescases_ida' =>
        array (
          'name' => 'cli_caselineitems_casescases_ida',
          'type' => 'varchar',
          'len' => 36,
        ),
        'cli_caselineitems_casescli_caselineitems_idb' =>
        array (
          'name' => 'cli_caselineitems_casescli_caselineitems_idb',
          'type' => 'varchar',
          'len' => 36,
        ),
      ),
      'indices' =>
      array (
        0 =>
        array (
          'name' => 'cli_caselineitems_casesspk',
          'type' => 'primary',
          'fields' =>
          array (
            0 => 'id',
          ),
        ),
        1 =>
        array (
          'name' => 'cli_caselineitems_cases_ida1',
          'type' => 'index',
          'fields' =>
          array (
            0 => 'cli_caselineitems_casescases_ida',
          ),
        ),
        2 =>
        array (
          'name' => 'cli_caselineitems_cases_alt',
          'type' => 'alternate_key',
          'fields' =>
          array (
            0 => 'cli_caselineitems_casescli_caselineitems_idb',
          ),
        ),
      ),
    );
  • I double check the codes your shared and I didn't see anything weird.

    I'll try to replicate it in a fresh install and let you know asap.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi André,

    could you point me to the right direction to what I should update to fix this?