Hi, thank for your reply,
that’s what I did to add the JS satisfactory but any movement in studio or after some time, the JS begins to fail and Suite did not recognize JS scripts, I checked the editviewdefs and it is overwrited.
here is an example of code.
Thanks for the support
<?php
$viewdefs ['Accounts'] =
array (
'EditView' =>
array (
'templateMeta' =>
array (
'form' =>
array (
'buttons' =>
array (
0 => 'SAVE',
1 => 'CANCEL',
),
),
'maxColumns' => '2',
'widths' =>
array (
0 =>
array (
'label' => '10',
'field' => '30',
),
1 =>
array (
'label' => '10',
'field' => '30',
),
),
'includes' =>
array (
0 =>
array (
'file' => 'custom_folder/libs_js/jquery.js',
),
1 =>
array (
'file' => 'custom_folder/libs_js/jquery-ui.js',
),
2 =>
array (
'file' => 'custom_folder/libs_js/HandlerCommonMethods.js',
),
3 =>
array (
'file' => 'custom_folder/Modulos/Clientes/js/editview.js',
),
4 =>
array (
'file' => 'modules/Accounts/Account.js',
),
),
'useTabs' => false,
'tabDefs' =>
array (
'LBL_ACCOUNT_INFORMATION' =>
array (
'newTab' => false,
'panelDefault' => 'expanded',
),
'LBL_PANEL_ADVANCED' =>
array (
'newTab' => false,
'panelDefault' => 'expanded',
),
),
),
'panels' =>
array (
'lbl_account_information' =>
array (
0 =>
array (
0 =>
array (
'name' => 'name',
'label' => 'LBL_NAME',
'displayParams' =>
array (
'required' => true,
),
),
1 =>
array (
'name' => 'phone_office',
'label' => 'LBL_PHONE_OFFICE',
),
),
1 =>
array (
0 =>
array (
'name' => 'email1',
'studio' => 'false',
'label' => 'LBL_EMAIL',
),
1 =>
array (
'name' => 'website',
'type' => 'link',
'label' => 'LBL_WEBSITE',
),
),
2 =>
array (
0 =>
array (
'name' => 'billing_address_street',
'hideLabel' => true,
'type' => 'address',
'displayParams' =>
array (
'key' => 'billing',
'rows' => 2,
'cols' => 30,
'maxlength' => 150,
),
),
1 =>
array (
'name' => 'shipping_address_street',
'hideLabel' => true,
'type' => 'address',
'displayParams' =>
array (
'key' => 'shipping',
'copy' => 'billing',
'rows' => 2,
'cols' => 30,
'maxlength' => 150,
),
),
),
3 =>
array (
0 =>
array (
'name' => 'description',
'label' => 'LBL_DESCRIPTION',
),
),
),
'LBL_PANEL_ADVANCED' =>
array (
0 =>
array (
0 => 'account_type',
1 =>
array (
'name' => 'other_account_type_c',
'label' => 'LBL_OTHER_ACCOUNT_TYPE',
),
),
1 =>
array (
0 => 'industry',
1 =>
array (
'name' => 'other_industry_c',
'label' => 'LBL_OTHER_INDUSTRY',
),
),
2 =>
array (
0 => 'employees',
1 => 'campaign_name',
),
3 =>
array (
0 =>
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_TO',
),
),
),
),
),
);
$viewdefs['Accounts']['EditView']['templateMeta'] = array (
'includes' =>
array (
0 =>
array (
'file' => 'custom_estrasol/libs_js/jquery.js',
),
1 =>
array (
'file' => 'custom_folder/libs_js/jquery-ui.js',
),
2 =>
array (
'file' => 'custom_folder/libs_js/HandlerCommonMethods.js',
),
3 =>
array (
'file' => 'custom_folder/Modulos/Clientes/js/editview.js',
),
4 =>
array (
'file' => 'modules/Accounts/Account.js',
),
),
'form' =>
array (
'buttons' =>
array (
0 => array (
'customCode' => '<input title="Guardar" accesskey="S" type="button" name="Guardarcstm" value="Guardar" id="SAVE">',
),
1 => 'CANCEL',
),
),
'maxColumns' => '2',
'widths' =>
array (
0 =>
array (
'label' => '10',
'field' => '30',
),
1 =>
array (
'label' => '10',
'field' => '30',
),
),
'useTabs' => false,
'tabDefs' =>
array (
'LBL_ACCOUNT_INFORMATION' =>
array (
'newTab' => false,
'panelDefault' => 'expanded',
),
'LBL_PANEL_ADVANCED' =>
array (
'newTab' => false,
'panelDefault' => 'expanded',
),
),
);
?>