Solved

Opportunity join with Relations table

  • 26 April 2023
  • 2 replies
  • 137 views

Userlevel 5
Badge

On the relations tab of an opportunity, we are listing out related contacts on a file (internal employees and external contacts).

 

I would like to pull this information out and display on a GI - but I can only seem to use CRRelation to link an OPT to a SO and not to display the required information.

 

Here are the joins:

 

Here are the details I am trying to pull out:

My current joins are blank for the record above (there is no SO for this OPT yet).

icon

Best answer by darylbowman 26 April 2023, 15:58

View original

2 replies

Badge +11

I believe you’d want to join CROpportunity.NoteID to CRRelation.RefNoteID and then join CRRelation.TargetNoteID to Contact.NoteID (for Contacts).

This is actually a somewhat complex situation because CRRelation joins to various types of entities. You can see what kind of entity the relation is for in CRRelation.RefEntityType.

A GI may not really be the best place to do this, unless you’re only hoping to display one ‘type’ of entity, like Contacts.

Userlevel 5
Badge

I believe you’d want to join CROpportunity.NoteID to CRRelation.RefNoteID and then join CRRelation.TargetNoteID to Contact.NoteID (for Contacts).

This is actually a somewhat complex situation because CRRelation joins to various types of entities. You can see what kind of entity the relation is for in CRRelation.RefEntityType.

A GI may not really be the best place to do this, unless you’re only hoping to display one ‘type’ of entity, like Contacts.

Thanks Daryl - I will give this a shot.

 

I’m actually trying to display only the Employee type on this GI, so I’ll use this logic above on the Employee table.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved