UserGuide 0.5
UserGuide 0.5
Views Customization
view.edit.php
require_once('custom/include/utils/DevToolKitManager.php');
3. Customize the method display(), add the $this->manager->display(); code just before $this-
>ev->process();
function display() {
$this->manager->display();
$this->ev->process();
echo $this->ev->display();
}
For a new view.edit.php the full code should looks like that:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.edit.php');
require_once('custom/include/utils/DevToolKitManager.php');
echo $this->ev->display();
}
function process() {
parent::process();
$this->manager->process();
}
}
?>
view.detail.php
require_once('custom/include/utils/DevToolKitManager.php');
3. Customize the method display(), add the $this->manager->display(); code just before $this-
>ev->process();
function display() {
$this->manager->display();
$this->ev->process();
echo $this->ev->display();
}
For a new view.edit.php the full code should looks like that:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.detail.php');
require_once('custom/include/utils/DevToolKitManager.php');
function process() {
$this->manager->process();
parent::process();
}
}
?>
view.list.php
require_once('custom/include/utils/DevToolKitManager.php');
3. Customize the method display(), add the $this->manager->display(); code just before $this-
>ev->process();
function display() {
$this->manager->display();
$this->ev->process();
echo $this->ev->display();
}
For a new view.edit.php the full code should looks like that:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.list.php');
require_once('custom/include/utils/DevToolKitManager.php');
function process() {
$this->manager->process();
parent::process();
}
}
?>
Metadata customization
Required Fields
Explanation:
● First level array (opportunity_type and product_type_c) represents the mandatory fields,
which will trigger the toggle required fields;
● Second level array (Existing Business, New Business) represents the possible values for the
mandatory fields, according to a specific value some specific set of fields will have the
require option toggled;
● Third level array (next_step, description) represents the field whose required option will be
toggled. Note that all fields set in the third level array needs to have the value “1” if they are
required and “0” if they are not required.
Dependent Dropdowns
Explanation:
● First level array (product_type_c) represents the mandatory dropdown;
● Second level array (MATERIAIS, IMPLANTACAO, ARMAZENAGEM, SERVICOS)
represents the possible values for the mandatory dropdown. Each value will update a
specific set of secondary dropdowns;
● Third level array (product_name_c) represents the secondary dropdown field. Note that its
value represents the dropdown that will be loaded to fill in secondary dropdown field.
Obviously you have to create the dropdowns through “Admin -> Dropdown Editor” before
testing the toolkit.
Editable Fields
Explanation:
● First level array (opportunity_type) represents the mandatory fields, which will trigger the
toggle editable fields;
● Second level array (Existing Business, New Business) represents the possible values for the
mandatory fields, according to a specific value some specific set of fields will have the
editable option toggled;
● Third level array (amount, checkbox_2_c) represents the field whose editable option will
be toggled. Note that all fields set in the third level array needs to have the value “false”, to
become non-editable. It is because all other fields will be editable ones.
Explanation:
● Array elements (name, product_name_c) represents the whose for whom the duplicate
validation will be performed;
Dynamic Panels
Explanation:
● First level array (lead_source) represents the mandatory fields, which will trigger the
toggle panel fields;
● Second level array (Cold Call, Existing Customer) represents the possible values for the
mandatory fields, according to a specific value some specific set of fields will have the panel
toggled;
● Third level array (lbl_email_addresses, lbl_contact_information) represents the panel name
which will be toggled. Note that all fields set in the third level array needs to have the value
“1”, to become visible for the selected value on second level array for the field on first level
array.
Important notes:
● All panels at both editviewdefs.php and detailviewdefs.php must be in lowercase.
● It is necessary to customize both detailviewdefs.php and detailviewdefs.php to have the
same panels with the same name if you want to be displayed to expected panels on both
layouts.