Relate field to 'Employees' module

Hi,

I have built a custom module using module builder and have deployed to a Sugar instance.

I want to add a Relate field in the custom module which links to the Employees module. This is because the information to be captured can relate to either ex-staff, or indeed staff who are not users of the CRM application and I would like a field which exposes the Employee records.

I found this external post from 2011 but it refers to Sugar 6x and I'm not sure how to map this to the current Sugar framework.

Thanks

Neil

Angel's Blog: SugarCRM Customization: Employees Relate Field 

Parents
  • Hi Andres Lopez

    I've not had any response to this question and juts wondered if you had any ideas ?

    I know you often have very good ones

    Thanks

    Neil

  • Employees module is, basically, a view for Users module.

    You can follow the tips shared by Angel Magana (custom fields to be created on extended vardefs of your custom module).

    After that follow these steps:

    • Save the attached js file into custom/clients/base/fields/enum-api/
    • Create an endpoint which fetchs list of users, even the inactive ones, take the attached php file as an example
    • Add, into record view of your custom module, the id field you just created, as per Angels' blog, additionally place these two attributes into field definition:

    'type' => 'enum-api',
    'api' => 'Contacts/xportal_role_list/',

    Replace the value of attribute api by the path of yours.

    Run QRR, Rebuild JS Grouping Files and finally Clear Additional Cache. Clear browser cache and enjoy it.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • Employees module is, basically, a view for Users module.

    You can follow the tips shared by Angel Magana (custom fields to be created on extended vardefs of your custom module).

    After that follow these steps:

    • Save the attached js file into custom/clients/base/fields/enum-api/
    • Create an endpoint which fetchs list of users, even the inactive ones, take the attached php file as an example
    • Add, into record view of your custom module, the id field you just created, as per Angels' blog, additionally place these two attributes into field definition:

    'type' => 'enum-api',
    'api' => 'Contacts/xportal_role_list/',

    Replace the value of attribute api by the path of yours.

    Run QRR, Rebuild JS Grouping Files and finally Clear Additional Cache. Clear browser cache and enjoy it.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children