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 :
Microsoft Dynamics AX (Archived)

View synchronization failing

(0) ShareShare
ReportReport
Posted on by 4,079

I have made a new Query, Under Data Sources i put the PriceDiscTable, and under PriceDiscTable´s Data Sources i put InventTable.

Now i can add this Query to a view and add some of the fields from PriceDiscTable and InventTable, all works fine.

So not i add the table SalesLine, under PriceDiscTable´s Data Sources, and add lets say the TaxItemGroup field to the view.

Now when i run the View i get this error:

Cannot select a record in GJSOPriceDiscTable (GJSOPriceDiscTable).
The SQL database has issued an error.

SQL error description: [Microsoft][SQL Native Client][SQL Server]Invalid column name 'TAXITEMGROUP'.

SQL statement: SELECT A.ITEMRELATION,A.ACCOUNTRELATION,A.ITEMNAME,A.TXT,A.UNITID,A.AMOUNT,A.TAXITEMGROUP,A.RECID FROM GJSOPRICEDISCTABLE A WHERE ((((DATAAREAID=?) AND (DATAAREAID#2=?)) AND (DATAAREAID#3=?)) AND (DATAAREAID#4=?)) ORDER BY A.DATAAREAID,A.RECID OPTION(FAST 1)

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,126 Super User 2026 Season 1 on at

    Hi Rudi,

    Do you get errors on synchronizing this view?

  • Rudi Hansen Profile Picture
    4,079 on at

    No, and if I do a complete database synchronization I also get no errors.

    But if I look in the SQL database on the view, the field TAXITEMGROUP is not in it.

    So for some reason its not putting the change in the Query into the SQL database.

  • Community Member Profile Picture
    on at

    can you remove the Query from  the view , do Restore , Sync. DB and update your query ( Add tables whatever you want ) , once you have final query , put it in the view  add columns you want .

    Its a kind of Rework but would not take much time.

  • Rudi Hansen Profile Picture
    4,079 on at

    Hi Kumkum

    Tried that and it did not work.

    I still get the same error.

  • Sohaib Cheema Profile Picture
    49,666 Super User 2026 Season 1 on at

    Dear Rudi,

    kindly do following

    1) take a backup of your objects.

    2) delete view from sql server

    3) now, synch View from AX

    if issue is not resolved by above, that means something wrong with query of view and that needs a manual fix. Usually it is recommended to add only those fields which are needed i.e keeping fields Dynamic=No in query DataSources.

    This will make understandable the query and also it will be good for performance.

  • Rudi Hansen Profile Picture
    4,079 on at

    Hi Sohaib.

    Tried that and it does not work.

    It does look like some fields does work, just not SalesLine.TaxItemGroup or SalesLine.PriceUnit.

    If i create the fields manually in the View on SQL that works, but then next time the database is changed from AX if will fail again.

  • Sohaib Cheema Profile Picture
    49,666 Super User 2026 Season 1 on at

    so, you need to observe e your query carefully.

    Explore your query, and run it on SQL server to know what it is doing actually, to find the culprit

  • Faqruddin Profile Picture
    1,909 on at

    If you developed in test environment, Please restart your AOS and database services. I face similar problem during development and my problem is fixed by restating this two services.   

  • Rudi Hansen Profile Picture
    4,079 on at

    [quote user=""Sohaib"][/quote]

    so, you need to observe e your query carefully.

    Explore your query, and run it on SQL server to know what it is doing actually, to find the culprit

    It looks like everything is ok, this is the output from all the datasources in the query.

    Info Message (15:34:05) SELECT FIRSTFAST AccountRelation, Amount, ItemRelation, UnitId FROM PriceDiscTable WHERE ((ItemCode = 0)) AND ((AccountCode = 1))


    Info Message (15:34:05) SELECT FIRSTFAST ItemName FROM InventTable WHERE PriceDiscTable.ItemRelation = InventTable.ItemId JOIN FIRSTFAST Txt FROM InventTxt WHERE InventTable.ItemId = InventTxt.ItemId AND ((LanguageId = N'en-us'))


    Info Message (15:34:05) SELECT FIRSTFAST Txt FROM InventTxt WHERE InventTable.ItemId = InventTxt.ItemId AND ((LanguageId = N'en-us'))


    Info Message (15:34:05) SELECT FIRSTFAST TaxItemGroup, PriceUnit FROM SalesLine WHERE PriceDiscTable.ItemRelation = SalesLine.ItemId

  • Rudi Hansen Profile Picture
    4,079 on at

    [quote][/quote]

    If you developed in test environment, Please restart your AOS and database services. I face similar problem during development and my problem is fixed by restating this two services.   

    I did try restarting the AOS and SQL, but that did nothing to help.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#1
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#1
Pratik Bhosle Profile Picture

Pratik Bhosle 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans