Blogs
September
You would have always wondered if there is a possibility to add a field (Apt. No. , Suburb, etc.) to the existing SuiteCRM 8 address block. We are happy to share with you how you can achieve the same and have such additional fields in your address block.
1) Create a field in your module.
2) Add field to the address group.
3) Repair & Rebuild.
Let's take an example for the Accounts module,
Create a file and add field definition by extending vardefs.
custom/Extension/modules/Accounts/Ext/Vardefs/suburb.php
$dictionary['Account']['fields']['billing_address_suburb'] = array(
'name' => 'billing_address_suburb',
'vname' => 'LBL_BILLING_ADDRESS_SUBURB',
'type' => 'varchar',
'len' => '100',
'group' => 'billing_address',
'merge_filter' => 'enabled',
);
Add a label for suburb field.
custom/Extension/modules/Accounts/Ext/Language/en_us.suburb.php
Add below line in the file created above.
$mod_strings['LBL_BILLING_ADDRESS_SUBURB'] = 'Suburb';
- Perform quick repair & rebuild from admin and execute the query that appears.This will create a new field in your 'accounts' table.
Update group field definition
config/services/record/fields/grouped_fields_type_map.yaml
Find the address block and add the "suburb" field name as shown below.
Perform quick repair & rebuild from admin.
You will get the suburb field to the address group.
Comments
- No Comments Found.