Adding custom fields in edit and detail view through manifest

Greetings from InfoTechBuddies!!

Creating your own plug-in for SugarCRM? Have custom fields in SugarCRM’s existing/OOB modules?

Yes manifest has a directive which does this job!

'layoutfields' => array(
        array(
            'additional_fields' =>
            array(
                'Contacts' => '<field_name>'
            ),
        ),
        array(
            'additional_fields' =>
            array(
                'Accounts' => '<field_name>'
            ),
        ),
        array(
            'additional_fields' =>
            array(
                '<module_name>' => '<field_name>'
            ),
        ),
    ),

Done!

Some issues exist, like, SugarCRM forces the field to be on both views, edit and detail. And no way you can add field in list view, except you create your own script which does it for you in post_install.

Note :

1. Read the comments in code carefully and replace the variables as asked.
2. Here, <module_name> means the module name you see in the URL, for example, Contacts, Leads, Accounts, etc.
3. You may find the field names and its labels in Admin > Studio > <Your_module> > Fields > <Choose correct field> > Take 
Field Name and System Label.
4. <field_name> means the field name as per your requirement

Hope you find this blog post helpful.

Feel free to add comments and queries, that helps us to improve the quality of posts.

You can contact us at info@infotechbuddies.com

Thank you.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *