AnsweredAssumed Answered

Custom fields in Products don't show under Quotes record (Sugar 7.9)

Question asked by Krunoslav Djakovic on Nov 27, 2017
Latest reply on Nov 28, 2017 by André Lopes

Since Quotes moved to sidecar in 7.9 if you add custom field to Products module and add them to ./custom/modules/Products/clients/base/views/quote-data-group-list/quote-data-group-list.php according to: http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/Architecture/Quotes/index.html#Modif…  custom field is editable, can be saved etc. but if you reload page custom fields won't be loaded because API won't return them.

 

Workaround for this is to edit custom/modules/Quotes/clients/base/views/record/record.php (copy it from module if it doesn't already exist) and under panels/panel_header/fields/name/related_fields/product_bundle_items/fields add your custom fields:

        'panels' => 
        array (
          0 =>
          array (
            'name' => 'panel_header',
            'label' => 'LBL_PANEL_HEADER',
            'header' => true,
            'fields' =>
            array (
              array (
                'name' => 'name',
                'events' =>
                array (
                  'keyup' => 'update:quote',
                ),
                'related_fields' =>
                array (
                  0 =>
                  array (
                    'name' => 'bundles',
                    'fields' =>
                    array (
                    /*...*/
                      27 =>
                      array (
                        'name' => 'product_bundle_items',
                        'fields' =>
                        array (
                        /*...*/
                          17 => 'total_amount',
                          18 => 'my_custom_field_c',
                        ),

Outcomes