Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

How to trace serial number in AX Database

Posted on by 50

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 ? 

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How to trace serial number in AX Database

    Yes, actually you can.

  • Ali J Profile Picture
    Ali J 50 on at
    RE: How to trace serial number in AX Database

    I will try,

    Just one thing to make make sure.

    Can I skip search in InventSerial  as InventDim  contains same info ?

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How to trace serial number in AX Database

    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.

  • Ali J Profile Picture
    Ali J 50 on at
    RE: How to trace serial number in AX Database

    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 )

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How to trace serial number in AX Database

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans