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
  • Hi John,

    Our public KB article on the intro to Sugar Logic covers this scenario. In short, yes, you can use the Mass Update function to update records. Depending on how many records you have to update, this may become a time intensive process and in some cases, it may exceed the server limits if you try to update too many records at once. If you have thousands of records to update, it may be better to create a checkbox field in the module that you can mass update and filter records via that checkbox field. For example, once the field is created, filter the list view by all records with that field unchecked. Select ~1000 records and mass update them to have the field checked. Once the mass update completes, those records will have their calculated field updated and they will no longer return in the filtered list view.

    Another route you could take is to update all of your records via the REST API if you have the appropriate knowledge. This would allow you to run a process behind the scenes rather than working through the UI.

    Please let me know if you have any questions.

    Kind regards,

    Chris
Reply
  • Hi John,

    Our public KB article on the intro to Sugar Logic covers this scenario. In short, yes, you can use the Mass Update function to update records. Depending on how many records you have to update, this may become a time intensive process and in some cases, it may exceed the server limits if you try to update too many records at once. If you have thousands of records to update, it may be better to create a checkbox field in the module that you can mass update and filter records via that checkbox field. For example, once the field is created, filter the list view by all records with that field unchecked. Select ~1000 records and mass update them to have the field checked. Once the mass update completes, those records will have their calculated field updated and they will no longer return in the filtered list view.

    Another route you could take is to update all of your records via the REST API if you have the appropriate knowledge. This would allow you to run a process behind the scenes rather than working through the UI.

    Please let me know if you have any questions.

    Kind regards,

    Chris
Children
No Data