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)

Invent Trans Not Created While Adding Lines to PO

(0) ShareShare
ReportReport
Posted on by 151

Hello Experts,

I have one custom class that is pulling data from external source, then create PO and add lines to it.

Currently I am facing major problem. When I am checking PO->General->Line Quantities, Ordered Qty is showing is null. By this problem, I have to edit PO and go through the lines so that Ordered Qty gets updated.

Please help me on what function I am missing to update the ordered qty when inserting PurchLine records.

Note : I have change management and workflow enabled.

6136.Untitled.jpg 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi,

    This Ordered Qty is coming from the invent movements framework, make sure in your custom class to call the framework in the insert process, you can share your code and we can help you more.

    Thanks!

  • Mohammed Jabir OM Profile Picture
    151 on at

    Hi,

    Thanks for quick reply,

    Regarding the code part, Transaction collected in another table is inserted to base tables

    The final PO generated by the code have the problem.

  • Suggested answer
    Community Member Profile Picture
    on at

    That's weird I tried the same code here and is working fine for me:

    InsertPO.PNG

    In your code in this line: 

       purchLine.QtyOrdered = purchLine.calcQtyOrdered(purchLine.PurchQty);

    is returning 0 in my example.

    Maybe that is the issue.

  • Mohammed Jabir OM Profile Picture
    151 on at

    Hi Tatiana,

    Thanks for trying out.

    With respect to method calcQtyOrdered, Could you please help me how to troubleshoot. The strange thing as you mentioned. I experimented in test environment and it's working normal.

    Also one more clarification. When we add lines to PO, normally it will create transaction record in InventTrans with ordered state or the record is only created after PO gets confirmed.

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans