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 :
Microsoft Dynamics AX (Archived)

Error "Function InventCostTransCostList::newPlannedCostList has been used incorrectly" while posting the prodution order

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a production order.If i try to post the production order getting error "Function InventCostTransCostList::newPlannedCostList has been used incorrectly".Someone suggest me the solution.

Please see the below screenshots for reference.

NegativeQtyJournalPostError.JPG

*This post is locked for comments

I have the same question (0)
  • Crispin John Augustine Profile Picture
    37,081 on at

    Place a Debugger at newPlannedCostList() and see why and how it is getting called.

    Probably some other error/check failed earlier and it results in this..

  • Community Member Profile Picture
    on at

    Hi,

    I have debugged the above methods,but above condition is not satisfied in the "newPlannedCostList()".

    else

       {

           if

           // by products may not have a record of InventCostTrans associated

           (   _inventTable.isByProduct() ||

               (_inventTrans.PackingSlipReturned == NoYes::Yes && _inventTrans.InventTransOrigin().ReferenceCategory == InventTransType::QuarantineOrder) ||

               (_inventTrans.DatePhysical < InventStdCostConvItem::itemConversionDate(_inventTrans.ItemId) && _inventTrans.Qty != 0)

           )

    suggest me the solution.

  • Community Member Profile Picture
    on at

    Hi,

    Some one help me to resolve the error while posting the production order journal in ax 2012.

  • Crispin John Augustine Profile Picture
    37,081 on at

    I guess, you have to look at a few lines above:

    if (!costTrans.allQtyFieldsZero())

    and analyze why this is failing. It's because of this, the else block is entered on the first place.

  • Abby Abraham Profile Picture
    314 on at

    Hello 

    Has anyone found a solution to this?

    -Abe

  • Suggested answer
    Mark Prouty Profile Picture
    1,312 on at

    I believe this function fails when a prod journal posts with a net 0 balance. For example, journal removes ItemA serial 123 and adds ItemA serial 456. The net journal is 0 so there is no voucher created. A voucher number may be assigned, but there is no associated voucher. A voucher is a required field to lookup InventCostTrans record, and there will be no associated record. This method flows to the end and errors because there is nothing to identify this peculiar example of transaction.

    Solution: do not post a journal that for same items that net to 0.

    How to fix? still looking.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans