Double-hop foreign field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • josef
    Junior Member
    • Jul 2025
    • 6

    #1

    Double-hop foreign field

    Hello,

    I have created a custom entity called CCase (this is not the default Case entity).
    This entity has several one-to-one left relationships to other custom entities, for example CDemand and CSupply.

    The “child” entities are not linked to each other, and I intentionally want to keep it that way.

    Entity structure:

    Click image for larger version  Name:	entity_schema.png Views:	0 Size:	9.0 KB ID:	124346
    (Each child is linked only to CCase, not to each other.)

    What I would like to achieve is the following:

    In the detail view of CSupply, I want to display some fields from CDemand (which is linked to the same CCase).

    Is this possible in EspoCRM?
    For example, can this be done using something like a foreign field, but with a double-hop relationship (CSupply → CCase → CDemand)?
  • dreginald
    Senior Member
    • Sep 2018
    • 175

    #2
    Since there is no relationship between CSupply and CDemand, it is not feasible to get the values of fields in CDemand in CSupply using foreign fields. You can create new fields in CCase to fetch the value to CCase from CDemand (you can write formula for the same) and create foreign field between CCase and CSupply
    End-to-End EspoCRM Implementation & Customization by *astTECS Redefine efficiency, transforming static data into living insights. Talk to our Experts *astTECS Implementation Excellence - From Blueprint to Business Impact *astTECS’s CRM implementation team possesses a mix of technical expertise, business insight, change management skills, and stakeholder engagement abilities
    Last edited by dreginald; 01-30-2026, 01:17 PM.

    Comment

    • josef
      Junior Member
      • Jul 2025
      • 6

      #3
      Thank you for your response.

      Unfortunately, copying the data to CCase is not an option in my case. The values must remain fully synchronized, and I want to avoid duplicating data.

      Is there any other way to achieve this?
      For example, is there an extension in EspoCRM that would allow accessing fields from CDemand in CSupply without introducing data duplication?

      Thanks again for your help.
      Last edited by josef; 01-30-2026, 02:53 PM.

      Comment

      Working...