How can I display a field from one module in a different module?

I am running SugarCRM Professional, Version 7.2.  I want to add a field to a layout in the calls module, but the field I want to add is a Studio created field from a different module.  I searched the old Sugar vt bulletin forums and found lots of people talking about editing the php files and creating all kinds of relationships, but no one clearly said whether it can be done strictly via Studio.  This site seems less techie, but I have not found an answer here either.  Can I (without editing any source files manually or installing JavaScript files) make a field created for one module available for the layout of a screen in another?  It sure seems like something lots of people would want to do.  Thanks for any help I get (even if the answer is that it cannot be done).
Parents
  • Hi reluctant data and Paul,

    The functionality you are looking to achieve can be easily achieved with Sugar Logic which is a formula-based engine akin to Excel formulas. Since Paul's example is looking for a specific use, I will highlight his use case in the steps to achieve this functionality:
    1. Go to Admin > Studio > Calls > Fields > Add Field
    2. Create a text field called lead_account_name and on that field creation screen, check the 'Calculated Value' box and then 'Edit Formula':

    3. A formula builder window will pop up and on that pop-up, click the 'Related Field' button.
    4. Once that is clicked, set the module to 'Leads' and the field to 'Account Name', and then click 'Insert'

    5. This action will automatically create the necessary formula into the builder and then you can click 'Save' to return to the field creation.
    6. Click 'Save' again to finalize creating your field
    7. Remaining in Studio, go to Calls > Layouts > List View
    8. Locate the newly created field in the far right column and drag it over to the desired location in the first column labeled 'Default'.

    9. Click the 'Save & Deploy' button to publish the new layout.
    10. Create a call associated to a lead and see that the list view displays the expected information!

    With the above steps, you are all set to begin utilizing the new functionality. A couple notes towards understanding this feature:
    • This will only display data on records created or saved after the field is created. 
    • While the example above deploys the field to the list view, you can also deploy the field to any other available view in the module.
    • If you implement a significant number of calculated fields using related formulas on a module, you can negatively impact the performance when saving or mass updating records as these formulas need to perform backend calls to the other module(s) to retrieve and update the data.
    • Using these calculated fields is best done when you are only expecting a singular relationship to exist between the two modules. For instance, if I created a call with 2 leads as an attendee on the same call, then the account name retrieved by the formula would be arbitrary. If you need to pull specific data from a related record when other related records may also exist from the module, a custom logic hook is recommended.
    I hope this helps and please let me know if you have any questions!

    Kind regards,

    Chris
  • Your solution seems so easy, BUT when I go to the formula builder, the module that has the fields I need is not listed.  I see many others, but not the one I need.  I tried to fake the formula by adding one to see the format, which turns out to be:
    related($opportunities,"date_entered")

    I changed it to the right module name and field label but when I click save, it says UNKNOWN FIELD: MEETINGS (meetings is the module that is not appearing on the list).  I know I have the actual field name correct since I compared the format to one that does work, so it must still be complaining about the module name.

    Next, I poked around looking for any screen that might show a list of modules associated with the one I am trying to edit.  The relationships do not match what I see  as available modules, nor does any other list.  It is as though the Meetings module is just hidden somehow.

    If you or anyone has any extra advice on how to make a module appear on the list, I welcome it.
Reply
  • Your solution seems so easy, BUT when I go to the formula builder, the module that has the fields I need is not listed.  I see many others, but not the one I need.  I tried to fake the formula by adding one to see the format, which turns out to be:
    related($opportunities,"date_entered")

    I changed it to the right module name and field label but when I click save, it says UNKNOWN FIELD: MEETINGS (meetings is the module that is not appearing on the list).  I know I have the actual field name correct since I compared the format to one that does work, so it must still be complaining about the module name.

    Next, I poked around looking for any screen that might show a list of modules associated with the one I am trying to edit.  The relationships do not match what I see  as available modules, nor does any other list.  It is as though the Meetings module is just hidden somehow.

    If you or anyone has any extra advice on how to make a module appear on the list, I welcome it.
Children
No Data