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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

DB synchronization error when creating data entity

(0) ShareShare
ReportReport
Posted on by

Hi,

I am using AX 7 to create some entities. The entity starts at InventTable and goes to EcoResProduct. That complies and Syncs just fine. 

When I add an inner join to the EcoResProductTranslations I get the error below when I try to sync the DB.

Error Database execution failed: Column 'INSERTED.DATAAREAID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. 0

Then several SQL statements that created triggers but are not using the INSERTED.DATAAREAID reference. I have seen that SQL error plenty of times in my life and know what it means but don't know what I am doing to cause it.

I am joining on InventTable.Product = EcoResProductTranslations.Product. The entity key is ItemID so I thought that the multiple rows per item might be a problem therefore I added a  range to only return en-us. But that did not work. 

When I remove the EcoResProductTranslations data source everything complies fine again, so know the issue is with this Join.

Any help would be appreciated.

Thanks in Advance

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Michael Morin Profile Picture
    on at

    I managed to figure this out. For the instance above I recreated the Entity and it worked. After a few month it reared it head again on another Entity. Turns out at the Entity level there is a parameter called "Primary Company Context" and it was set to DataAreaId. I made it blank and it worked. Because I as joining to tables that don't have a dataareaid this was a problem.

    You can read more about it here: ax.help.dynamics.com/.../&nbsp

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans