Notifications
Announcements
No record found.
I have a Dynamics AX 2012 database only and I am looking in a way to make query to get ( sales order number from serial number)
witch tables should I search in ?
InventSerial contains the serial numbers.
Join it with InventDim (on InventSerialId).
And join InventDim with SalesLine (on InventDimId).
Sales order number can be found in SalesLine.SalesId.
Thanks for your reply,
I have tried that using the following query :
SELECT *
FROM [dbo].[INVENTSERIAL]
INNER JOIN [dbo].[InventDim] ON ([dbo].[INVENTSERIAL].[INVENTSERIALID] = [dbo].[InventDim].[INVENTSERIALID])
INNER JOIN [dbo].[SalesLine] ON ([dbo].[InventDim].[InventDimId] = [dbo].[SalesLine].[InventDimId])
where [INVENTSERIAL].[INVENTSERIALID]='XXX';
But I got empty record in return ( despite that all three tables contains info )
The fact that all tables contain info doesn't mean that there exists a sales order for that Serial id.
I assume you can figure out what's the problem by looking at the data of the tables.
Start by one Serial Id, find the corresponding in InventDim, and then see if there's a SalesLine with that InventDimId.
I will try,
Just one thing to make make sure.
Can I skip search in InventSerial as InventDim contains same info ?
Yes, actually you can.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional