I have created one custom Module. I want to add SubPanel on record Create View of that Module.(like Opportunity module contains Revenue Line Item in its Record Create View) please help me..
I have created one custom Module. I want to add SubPanel on record Create View of that Module.(like Opportunity module contains Revenue Line Item in its Record Create View) please help me..
Hi Tejas Kulkarni,
You can add related module subpanel on create view in 2 easy steps.
Step1: Override the parent module create layout metadata file and add subpanels-create layout to the main-pane components array.
custom/modules/<your_module_name>/clients/base/layouts/create/create.php
$viewdefs['<your_module_name>']['base']['layout']['create'] = array(
'components' => array(
array(
'layout' => array(
'type' => 'default',
'name' => 'sidebar',
'components' => array(
array(
'layout' => array(
'type' => 'base',
'name' => 'main-pane',
'components' => array(
array(
'view' => 'create',
),
//add subpanels-create layout after create view
array(
'layout' => 'subpanels-create',
),
),
),
),
array(
'layout' => array(
'type' => 'base',
'name' => 'preview-pane',
'components' => array(
array(
'layout' => 'preview',
),
),
),
),
),
'last_state' => array(
'id' => 'create-default',
),
),
),
),
);
Step2: Create new subpanels-create layout in your parent module.
custom/modules/<your_module_name>/clients/base/layout/subpanels-create/subpanels-create.php
$viewdefs['<your_module_name>']['base']['layout']['subpanels-create'] = array(
'type' => 'subpanels',
'components' => array(
array(
'layout' => 'subpanel-create',
'label' => 'LBL_CUSTOM_MODULE_SUBPANEL_TITLE',
'context' => array(
'link' => '<link_name_for_related_module>',
),
)
),
);
Let us know if this helps.
Regards.
Hi Hatim or anyone else,
I tried to implement this functionality for the cases module to add the creation of other related module to it. The subpanel is rendered, the columns are visible but there is no model created. In other words, the subpanel is empty? Any thoughts?
Hi Hatim or anyone else,
I tried to implement this functionality for the cases module to add the creation of other related module to it. The subpanel is rendered, the columns are visible but there is no model created. In other words, the subpanel is empty? Any thoughts?
Perhaps you need to define the attribute 'override_subpanel_list_view' on subpanels-create layout.
Also double check if there are some error message in the console tab of Browser's developer tools.
Hi Jeroen,
Not a current thread, I am asking nevertheless. Were you able to solve the problem?
I am as far as you were. I see the view and subpanel in the create view, but the controls in the subpanel-top are missing.
I am trying to achieve this with a custom module and the Notes module.... We are on version 13.0.0
Thank you very much for a short feedback.
Happy Weekend
Rene