web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Automate the Item Price BOM Calculation Process in AX 2012

(0) ShareShare
ReportReport
Posted on by 935

I have been asked to automate the item price calculation process. It need to pass in the following fields to that screen: Costing Version, Configuration, Size, Color, Style, Site, Calculation date, BOM, Route number, Quantity.

Can anyone give me a starting point?

Do I use BomCalcJob for this?

Any examples or help would be greatly appreciated. This would occur in the background so I do not want the form to display for anything.

Thanks

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    306,846 Super User 2026 Season 2 on at

    Hi,

    It is possible to run this calculation in batch (with recurrency) for specific items or a costing version.Would that be the solution for your needs? Or are you looking for a more specific solution?

  • Sylvryd Profile Picture
    935 on at

    Thanks for the response. I am open to any ideas at this point.

    My only requirements would be to run without user interaction but i also need to know if there are any info log warnings or errors returned after the process completes ( or fails).

    I am new to AX so i am not sure how to initiate this process in batch.

    It would be possible that i would need to run this same process for a group of items at the same time.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    306,846 Super User 2026 Season 2 on at

    When you run the calculation job, you can set your options and a query to specify which items to include. On the Batch tab. Clock Batch processing and specify a Batch group when needed. With the button Recurrence you can specify the interval of this job.

    Make sure one or more servers (AOS) are set to be used as a batch server.

     

     

  • Sylvryd Profile Picture
    935 on at

    thanks

    I would need to populate that via code.

    Right now i have the following:

                       BOMCalcJob_Item aBOMCalcJob_Item = new BOMCalcJob_Item();

                       aBOMCalcJob_Item.initParmDefault();

                       aBOMCalcJob_Item.init();

                       aBOMCalcJob_Item.parmCalcDate(DateTime.Now);  

                       aBOMCalcJob_Item.parmItemId(inventTable.ItemId);

                       aBOMCalcJob_Item.parmInventDimId(inventdim.inventDimId);

                       aBOMCalcJob_Item.parmItemQty(aLine.SalesQty);  

                       aBOMCalcJob_Item.parmVersionId("2013"); /* need to lookup */

                       aBOMCalcJob_Item.parmBOMId(aLine.ItemBOMId);

                       aBOMCalcJob_Item.parmRouteId(aLine.ItemRouteId);

                        aBOMCalcJob_Item.run();

    When this runs i know it is running a calculation but it does not appear to be placing it into the pending prices.

    Any thoughts?

    Am i using the correct BOMCalcJob class? there are a couple different classes that extend such as the one i am using 'BOMCalcJob_Item'

  • Sylvryd Profile Picture
    935 on at

    I guess if i rephrase my question after doing some digging i need to know:

    how do i create a 'InventItemPriceSim' ?

    I will also later need to active the 'InventItemPriceSim' record.

    Any direction is appreciated.

    Thanks

  • Verified answer
    Sylvryd Profile Picture
    935 on at

    I found the missing code that I needed to get the pending price & sales price to populate the pending.

    I needed to add the 'parmCostPriceTransfer' & 'parmSalesPriceTransfer' calls setting the value for both to YES

    My final solution that seems to now be working the way i need it to is as follows:

    BOMCalcJob_Item aBOMCalcJob_Item = new BOMCalcJob_Item();
    aBOMCalcJob_Item.initParmDefault();
    aBOMCalcJob_Item.init();
    aBOMCalcJob_Item.parmVersionId("2013"); /* NEED LOOKUP */
    aBOMCalcJob_Item.parmItemId(inventTable.ItemId);
    aBOMCalcJob_Item.parmInventDimId(inventdim.inventDimId);
    aBOMCalcJob_Item.parmItemQty(aLine.SalesQty);
    aBOMCalcJob_Item.parmBOMId(aLine.ItemBOMId);
    aBOMCalcJob_Item.parmRouteId(aLine.ItemRouteId);
    aBOMCalcJob_Item.parmCostPriceTransfer(NoYes.Yes); //Default no - Required to actually populate the pending cost price
    aBOMCalcJob_Item.parmSalesPriceTransfer(NoYes.Yes); //Default no - Required to actually populate the pending sales price
    aBOMCalcJob_Item.run();

  • Community Member Profile Picture
    on at

    Hi SYLVRYD,

    Now i'm doing on the same issue.

    Can you please share your issue compilation & solution with me ?

    My mail id is  ramchalla@outlook.com

  • Community Member Profile Picture
    on at

    How can I select to run for all items without BomCalc?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans