How do I set the default value and Help Text of a out of the box / stock field say in the Accounts module?
Is there a reference guide to show me how to customize OOB fields in the existing modules in general?
version 5.5.1 CE
How do I set the default value and Help Text of a out of the box / stock field say in the Accounts module?
Is there a reference guide to show me how to customize OOB fields in the existing modules in general?
version 5.5.1 CE
Hi,
you may build a install package that include all your OOB fields customizations and install it to your instance.
Here is a simple tutorial to teach how to customize SugarCRM OOB fields.
Hope it answer your question.![]()
I am from iZeno Pte Ltd
Personal Site: Technical Sharing
SugarForge Project:
iZeno SMS : http://www.sugarforge.org/projects/izeno-sms/
Chinwoei,
Why do you build an install package rather than creating an extension in place? Is there an advantage I don't know about?
If you're going to install this on several systems an install package is better. But for a single system I would just create the file in place to define the default value and help text.
Here is my file <sugarroot>/custom/Extension/modules/Accounts/Ext/Vardefs/custom.php that changes the country fields to dropdowns:
You can do the same thing to set the default and help values for a field something like:PHP Code:<?php
$dictionary['Account']['fields']['billing_address_country']['type'] = 'enum';
$dictionary['Account']['fields']['billing_address_country']['options'] = 'countries_dom';
$dictionary['Account']['fields']['shipping_address_country']['type'] = 'enum';
$dictionary['Account']['fields']['shipping_address_country']['options'] = 'countries_dom';
?>
Just add the file and do a Quick Repair and Rebuild. If it doesn't do what you want, delete or rename the file something other than .php and repair again and it will restore it the way it was while you sort out the problems.PHP Code:<?php
$dictionary['Account']['fields']['billing_address_country']['help'] = 'This is the country for the billing address';
$dictionary['Account']['fields']['billing_address_country']['default'] = 'U.S.A.';
?>
If there is an advantage to the install package let me know, but a single extension file seems simpler.
Phil
I am from iZeno Pte Ltd
Personal Site: Technical Sharing
SugarForge Project:
iZeno SMS : http://www.sugarforge.org/projects/izeno-sms/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks