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

Retail Statement Posting > Function InventTrans.inventMovement has been used incorrectly.

(1) ShareShare
ReportReport
Posted on by 844

Open Retail Statement > Posting open statement gives error "Function InventTrans.inventMovement has been used incorrectly"

We are experiencing this error at one of our client's production environment (Dynamics AX 2012 R2 CU7). I have debugged the issue thoroughly and found that while constructing the InventMovement class for one of the movements (InventTrans), the originator (Table InventTransOrigin method call to method: originator(), queries 

respective table for related data, in our case RetailtransactionSalesTrans table since 150 (Statement) in ReferenceID field in InventTransOrigin table) is not found. 

Later while returning this movement object, its originator (buffer()) is validated and since not initialized, the IF condition is not met, so no variable is returned, the underlying condition is evaluated, which is met as true and gives the error. 

Process Knowledge

As far as I have investigated and inquired my colleagues, the process is that, 

First all sales transactions / movements are compiled / calculated

System then generates an SO (on runtime) 

When posting the SO, InventTrans aare generated to post the inventory physically

Posting is completed

 

Now during this process and somewhere in the InventUpdate classes, the invetMovement method is called which then looks that the request is from Statement (150) with Retail congif key ON, tries to find a record in RetailTransactionSalesTrans which is not there.

Hence the issue is identified, but the question is, if a Retail Statement is open, should such statements and their transactions have records in InventTrans and InventTransOrigin ? 

How is it possible that ITO has reference category to 150 (retail statement) and reference ID = valid retail statement (open state) has no reference record in RetailTransactionSalesTrans.

Is it a bug ? Is their any hotfix available ? If it is not, how to resolve it ? Any one else experienced it ? 

Kindly help me regarding this

*This post is locked for comments

I have the same question (0)
  • hatem.bouhdida Profile Picture
    5 on at

    Hello,

    I'm facing the same issue with my Retail customer, some transactions in inventory are marked with a statement which is already posted. the quantity is reserved and not posted.

    later when i try to use any item with this issue in a transfer, I have the error "Function InventTrans.inventMovement has been used incorrectly."

    The description you provided of the issue is correct, and I guess this is due to a bad internet connection when the server is trying to synchronize sales transactions from the store to the server (I'm not sure). I faced this issue with only one store which have a bad and non stable internet connection.

    I learned on internet that the fact to delete lines from inventtrans will solve the issue. is it right?

    What was the solution you applied  in your case?

    Thank you in advance.

    Hatem

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

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans