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, ...
Suggested Answer

Link between sales order and BOM tables

(0) ShareShare
ReportReport
Posted on by 2,426

Good Morning,

I am trying to export Data from BOM tables (BOMVersion,BOM,BOMtable) whenever sales order is confirmed .

All i have is salesline buffer .

So i am trying to find the relation between them.

Is there any specific method to find out link.

I found out BomVersion::FindActive().

is this a correct way.

Please provide some light on this.

Regards,

Have a nice day.

I have the same question (0)
  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi AX 2012 r3,

    There is a direct relation between SalesLine and BOMTable based on SalesLine.ItemBOMId = BOMTable.BOMId. If you are looking for a relationship between the BOM tables, you can check BOMItemSpecificBillOfMaterialsHeaderEntity.

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Sir,

    As mentioned,you need to check the BOMTable table. It contains all of the bills of materials and for each bill of materials, the information is stored about whether it has been approved and by whom.

    Data model diagram for BOMTable, BOM,BOMVersion, linked by BOMId field.

    757771.png

  • AX 2012 r3 Profile Picture
    2,426 on at

    Hi Gunjan,

    Thanks for your reply.

    I found there are multiple records in BomVersion.

    How can i find Active ones so thati can  i export data .

    BOMVersion::findActive()

    is this correct way.

    Because i saw in BOMVersion table have 2 records which are active and Aproved.

    So when sales order is getting confirmed i need to export Bomversion.Itemid and etc fields so how can i differentiate which records should i export from BOMVersion

    Please show some light on this.

    Regards,

    Have a nice day.

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Sir,

    Use BOMVersion::findActive() , you can find active BOM version and list its items.

    bomVersion = BomVersion::findActive( inventTable.ItemId, systemdateGet(), 1, null );
            
    if ( bomVersion ) 
    {
                
        while select bom 
        where bom.BOMId == bomVersion.BOMId 
        {            
          info( bom.ItemId   ", "    bom.UnitId );
        }
    }

    https://sivakumar007.wordpress.com/2009/09/14/finding-active-bom-components-of-item/

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi AX 2012 r3,

    You should find the active BOM version. But what details are you trying to export on sales order confirmation?

  • AX 2012 r3 Profile Picture
    2,426 on at

    Hi Gunjan,

    These are the details i want to export

    BOMtable.BOMID

    BOMtable.SiteID

    BOMtable.Approved

    BOMVersion.BOMID

    BOMVersion.ITEMID

    BOMVersion.Active

    BOMVersion.Approved

    BOM.ITEMID

    InventDimBOM.InventLocationId

    BOM.BOMQty

    BOM.UnitID

    BOM.BOMQtySerie

    BOMVersion.FromDate

    I do found multiple BomVersions.

    bomtable bomTable = bomtable::find(_salesline.itembomid);

    While select BOMVersion

    where bomversion.bomid == bomtable.bomid

               && bomversion.isActive

    {

       while select bom

          where bom.bomid == bomversion.bomid

        {

        }

    }

    Is this correct way.

    Please show some light on this.

    Regards,

    Have a nice day.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 613

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 292 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans