Hello there,
I’m doing that customization in my suiteCRM 8 instances by looking at this blog, the field is created in the database but, when I repair and rebuild it after updating the group field definition. The field doesn’t show up in any view.
So do I have to modify the same file to customize the grouped_fields_type_map.yaml file or do I have to enable front-end extensions and create another file?
And what would be the path to create the file for customization inside the front-end extension for this?
So how can I do it? Can you help me with this?
Thanks.
how did you add the field?
Hello @jkortus1234
I took the following steps to add the field to the account module.
Step 1: Create a file and add field definition by extending vardefs.
public/legacy/custom/Extension/modules/Accounts/Ext/Vardefs/landmark.php
$dictionary['Account']['fields']['billing_address_landmark'] = array(
'name' => 'billing_address_landmark',
'vname' => 'LBL_BILLING_ADDRESS_LANDMARK',
'type' => 'varchar',
'len' => '100',
'group' => 'billing_address',
'merge_filter' => 'enabled',
);
Step 2: Add a label for the landmark field.
public/legacy/custom/Extension/modules/Accounts/Ext/Language/en_us.landmark.php
$mod_strings['LBL_BILLING_ADDRESS_LANDMARK'] = 'Billing Landmark';
Step 3: Perform quick repair & rebuild from admin and execute the query that appears. This will create a new field in the ‘accounts’ table.
Step 4: Update group field definition
config/services/record/fields/grouped_fields_type_map.yaml
Find the address block and add the “landmark” field name.
Step 5: Perform quick repair & rebuild from admin.
I tried to add the field by following these steps but the field is not visible in any view.
I hope you find this helpful.
1 Like
Is there a reason you didnt just add the field through studio?
Hello @jkortus1234
Sorry, I didn’t understand your question. Would you please explain a bit more?
Thanks.
Did you read through anything related to studio first? If not- this way is much easier.
I have read about the studio. I know it’s straight from the studio.
Modifying the files is not required to simply add a field to the application. This can be done through studio → fields-> add field…
If you’re field is already showing in that list go to the layout option for your module and ensure that the field is displayed there as well.
Hello @jkortus1234
I can add fields from Studio, which also appear in the field layout. But you must know that the Billing Address and Shipping Address are group fields in SuiteCRM 8.
But I want to add a field to the billing/shipping address group.
So how can I do it? Can you help me with this?
Thanks.
Unsure what you mean with the group field part, may be something I haven’t had to address yet since everything we do is customized. Are you meaning you want the fields to be in the same area as the billing / shipping addresses?