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)

Classes During Inventory Movement ::InventUpd_Physical/InventUpdate

(0) ShareShare
ReportReport
Posted on by 2,546

Hello everyone!!

I want to execute my customised code during the physical movement In/out through Purchase Product receipt/Sales Packing Slip/Inventory Journal...

don't want to execute my code during the time of sales invoice/purchase invoice...

after debugging i found Class - InventUpd_Physical -- (update now method) is the most suitable place ..

share your views and guide me ...

suggest a better solution also

Regards,

Piyush Adhikari

Thanks in advance :)

Piyush

*This post is locked for comments

I have the same question (0)
  • Piyush Adhikari Profile Picture
    2,546 on at

    i also need lines buffer

  • Community Member Profile Picture
    on at

    Hi Piyush,

    This depends on what you are trying to write / customize. So make your own call. or please explain your scenario clearly so that the community can give you a better idea.

    Thanks,

    Ganesan Natarajan

  • Piyush Adhikari Profile Picture
    2,546 on at

    Sir,

    thanks for your response.....

    Well I want to update some fields in a customised table during the time of negative  Qty transaction(like negative adjustment,purchase return ,sales,TO,transfer journal , counting journal, movement).

    So I am looking for a best  single global place where i can place my X++ codes.

    I also require some fields ItemId, InventDimId,Qty etc(Line buffer).

    I found 'InventUpd_Physical Class' suitable for this customisation.

  • Community Member Profile Picture
    on at

    Hi Piyush Sir,

    I have similar requirement as mentioned by you i.e whenever there will be movement of item, a new entry should be captured in my custom table.

    Posting Type in which a new entry should be captured :

    Purchase Product Receipt

    Purchase Invoice

    Sales Invoice

    Inventory Journal(Movement,Transfer,Adjustment)

    Production

    Transfer Order

    So, will it work by placing the code in InventUpd_Physical Class or i will have to use different class for this requirement  ??

    Please Suggest

    Waiting for the response..

    Thanks

    Best Regards

    Sagar Batra

  • Suggested answer
    jasman Profile Picture
    1,413 on at

    First take a look at the super class of InventUpd_Physical and read the xml-documentation in class declaration. You'll find out that InventUpd classes are closely connected to InventMovement classes.

    Now going back to InventUpd_Physical - if you take a look at the method updateNow you can see, that if the physical qty being updated is less than zero one of two methods is called (depending on if the returnMode is set).

    Either the code in the updatePhysicalIssue or the updatePhysicalReturnedIssue methods should be overlayered or you should do the Event Handler Subscription (msdn.microsoft.com/.../gg839762.aspx and blogs.msdn.com/.../how-to-use-x-delegates-in-dynamics-ax-2012.aspx) pattern on the method you want to subscribe to.

    In your code you should examine the movement object (InventMovement-subclass) to see if it is the right kind of inventory movement (sales or purchase etc.) and then your code to update the table should be run.

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