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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Cannot receive quantity 1.00 because inventory transactions with status Ordered

(3) ShareShare
ReportReport
Posted on by 15
Hey everyone,
 
            Recently, there was an error stating "Cannot receive quantity 1.00 because inventory transactions with status Ordered, Arrived or Registered are insufficient." in a custom Odata method developed for Receive transfer order and if the TO is receive manually in F&O there is no error and also I have checked the inventory transaction for the specified TO and it line item . Cannot find any issue in it.
 
TO- inventory.png
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    It's difficult to comment on with no information about your code and your data. Please tell us more.
     
    Moved from Integration, Dataverse, and general topics forum to Finance | Project Operations, Human Resources, AX, GP, SL forum.
  • HM-27060701-0 Profile Picture
    15 on at
    hey martin,
     
     here is the code I used to post receive now quantity against transfer order
     
    ttsbegin;
    inventTransferParmTable.clear();
    inventTransferParmTable.initParmDefault();
    inventTransferParmTable.ParmId = RunBaseMultiParm::getSysParmId();
    inventTransferParmTable.TransferId = TransferOrderNumber;
    inventTransferParmTable.UpdateType = InventTransferUpdateType::Receive;
    inventTransferParmTable.PrintTransferReceipt = NoYes::No;

    inventTransferParmTable.AutoReceiveQty=true;

    inventTransferParmTable.ReceiveUpdateQty= InventTransferReceiveUpdateQty::ReceiveNow;
    inventTransferParmTable.EditLines = NoYes::Yes;
    inventTransferParmTable.ExplodeLines = NoYes::Yes;
    inventTransferParmTable.InventDimFixedReceiveList = 0;
    inventTransferParmTable.insert();
                   
    while select inventTransferLine
    where inventTransferLine.TransferId == TransferOrderNumber
    {
        if(inventTransferLine.LMG_ScrapNow)
        {
            select forUpdate inventransferparamline
            where inventransferparamline.ParmId == inventTransferParmTable.ParmId
            && inventransferparamline.TransferId == inventTransferLine.TransferId
            && inventransferparamline.LineNum == inventTransferLine.LineNum;
            if (inventransferparamline)
            {
                ttsbegin;
                inventransferparamline.QtyScrapNow = inventTransferLine.LMG_ScrapNow;
                inventransferparamline.update();
                ttscommit;
            }
        }
    }
                   
    select inventparmloc
        where inventparmloc.TransferId ==TransferOrderNumber
        && inventparmloc.UpdateType== InventTransferUpdateType::Receive;
    inventTransferUpdReceive = InventTransferUpdReceive::newParmBuffer(inventparmloc);
    if(inventTransferUpdReceive.validate())
    {
        inventTransferUpdReceive.run();
        if(inventTransferParmTable.RecId)
        {
            lifecycle.parmlifecycle(TransferOrderNumber,warehouseIntParam.ClientID,_transactionType,_documenttype,"Transfer Order Received-Processed");
            lifecycle.parmLogTrack(TransferOrderNumber,warehouseIntParam.ClientID,_transactionType,_documenttype,LMG3PLLogType::Info,"Transfer Order Received-Processed");
        }
    }
    ttscommit;
  • HM-27060701-0 Profile Picture
    15 on at
    hey, everyone, I still cannot figure what is happening, but my code works as expected when I test but the production record provided by my client is where the error occurred.
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans