SugarCRM On-Demand Convert TextField to DropDown

一曲冷凌霜 提交于 2019-12-04 12:34:52

You need to create the manifest.php file and have that point to the file(s) you want to copy/upload for customization:

manifest.php:

<?php

$manifest = array(
    'built_in_version' => '7.6.1.0',
    'acceptable_sugar_versions' =>
        array(
            0 => '',
        ),
    'acceptable_sugar_flavors' =>
        array(
            0 => 'PRO',
            1 => 'CORP',
            2 => 'ENT',
            3 => 'ULT',
        ),
    'readme' => '',
    'key' => 'SO',
    'author' => 'Eric',
    'description' => 'Convert Accounts Billing Country TextField to Enum',
    'icon' => '',
    'is_uninstallable' => true,
    'name' => 'TextFieldToDropdownPkg',
    'published_date' => '2016-01-10 03:01:01',
    'type' => 'module',
    'version' => 1452378413,
    'remove_tables' => 'prompt',
);

$installdefs = array(
    'id' => 'TextFieldToDropdownPkg',
    'copy' => array(
        0 => array(
            'from' => '<basepath>/custom/Extension/modules/Accounts/Ext/Vardefs/custom_billing_address_country.php',
            'to' => 'custom/Extension/modules/Accounts/Ext/Vardefs/custom_billing_address_country.php',
        ),
    ),
);

Then create:

custom/Extension/modules/Accounts/Ext/Vardefs/custom_billing_address_country.php

<?php

$dictionary['Account']['fields']['billing_address_country']['comments']='Country for primary address';
$dictionary['Account']['fields']['billing_address_country']['group']='primary_address';
$dictionary['Account']['fields']['billing_address_country']['options']='countries_dom';
$dictionary['Account']['fields']['billing_address_country']['type']='enum';

ZIP those files up and use Module Loader.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!