web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Error when exporting the entity: Invalid relation between entities

(0) ShareShare
ReportReport
Posted on by 465

Hi,

I created this composite entity
pastedimage1676551514125v1.png

Table1Entity has a View called Table1LogView inner joined with Table1(Relation Table1LogView.JournalId= Table1.JournalId)

EntityKey is JournalId coming from the view

Table1LogView  is like this:

SELECT        MAX(RECID) AS TABLE1LOGVIEWRECID, JOURNALID, STATUS, DATAAREAID, PARTITION, 1010 AS RECID
FROM            dbo.TABLE1LOG AS T1
WHERE        (STATUS = 0)
GROUP BY JOURNALID, STATUS, DATAAREAID, PARTITION


Table1 contains this
Id  JournalId  JournalParmId  JournalType
1     J1           1A             10
1     J2           2B             15
1     J3           2B             0
1     J4           4C             15
1     J5           4C             15
1     J6           4C             15


Table1LogView Contains this  (hence J2 is not appearing)
Id  JournalId      Staus
1     J1           0            
1     J3           0            
1     J4           0             
1     J5           0             
1     J6           0



LinkedTable1Entity  has View called LinkedTable1View inner joined with Table1    (Relation LinkedTable1View.ViewRecId= Table1.RecId)

EntityKey
is JournalId coming from Table1

The view is like this

SELECT        MIN(RECID) AS VIEWRECID, JOURNALPARMID, ID, DATAAREAID, PARTITION, 1010 AS RECID
FROM            dbo.TABLE1 AS T1
WHERE        (POSTED = 1)
GROUP BY JOURNALPARMID, ID, DATAAREAID, PARTITION
HAVING        (COUNT(RECID) = 2)



Relation between LinkedTable1Entity  and Table1Entity is:

LinkedTable1Entity.Id = Table1Entity.Id
AND 
LinkedTable1Entity.JournalParmId= Table1Entity .JournalParmId

However, I'm getting this error when exporting:
Invalid relation between entities


If i do this:

 

select ID,JOURNALID,JOURNALPARMID,JOURNALTYPE From TABLE1ENTITY

I get this

Id  JournalId  JournalParmId  JournalType
1     J1           1A             10
1     J3           2B             0
1     J4           4C             15
1     J5           4C             15
1     J6           4C             15



select ID,JOURNALID,JOURNALPARMID,JOURNALTYPE From LinkedTABLE1ENTITY

I get this

Id  JournalId  JournalParmId  JournalType
1     J2           2B             15



I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 510 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 399

#3
Adis Profile Picture

Adis 251 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans