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

Form throwing DBsync error in UAT

(0) ShareShare
ReportReport
Posted on by 42
 
Hi everyone
 
As part of Product receipt integration in d365fo via external systems using custom services, we have developed a staging a form where we are initially storing the data received from the external system.
Now I am facing this iisue with form in UAT, in my DEV environment everything is working fine

When i am opening my staging form in UAT i am getting this sync error as shown in the image
Error - 
  1. session 589428 (ayashar)
  2. SELECT T1.LEGALENTITYID,T1.PURCHASEORDERID,T1.VENDORACCOUNTID,T1.PRODUCTRECEIPT,T1.PRODUCTRECEIPTDATE,T1.VENDORNAME,T1.STATUS,T1.MESSAGE,T1.ERRORCODE,T1.TRANSACTIONID,T1.USERID,T1.SOURCE,T1.ISLOCATIONCHANGED,T1.MODIFIEDDATETIME,T1.CREATEDDATETIME,T1.RECVERSION,T1.PARTITION,T1.RECID FROM TECHNO_SLPRODUCTRECEIPTSTAGINGHEADER T1 WHERE (PARTITION=5637144576) ORDER BY T1.CREATEDDATETIME DESC,T1.CREATEDDATETIME DESC OPTION(FAST 54)
  3. [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique.
  4. Object Server Azure:
  5. Cannot select a record in RFID product receipt staging header (Techno_SLProductReceiptStagingHeader). The SQL database has issued an error.
 
 
 
 
 
Steps i did to try to resolve this but failed
-- Previously i had added sorting on "created date time" field in FormDS executequery() method, I removed it and redeployed
-- Cleared user cache in UAT
 
Can someone help me with this, we are also facing inconsistency in Outbound integration(sending the status of the product receipt record) , I assume it might be due to this error
 
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    239,101 Most Valuable Professional on at
    Moved from Integration, Dataverse, and general topics forum to Finance | Project Operations, Human Resources, AX, GP, SL forum.
     
    The problem is that CreatedDateTime is used twice in ORDER BY clause. You said you removed the sorting by CreatedDateTime, but it's clearly still there, therefore either your change didn't get deployed correctly, or you're working with a query that doesn't match your latest code (e.g. because of a saved view).
     
    Also, adding the sorting in executeQuery() was wrong, because that means adding a sorting field every time your run the query, e.g. when you apply a range. This is likely what produced the wrong query, because the same sorting field was added twice.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 733

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 278 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans