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)

InventSum Avail Physical Value

(0) ShareShare
ReportReport
Posted on by 160

Hello everyone,

Is there a common chunk of code that runs whenever there is an inventory related update i.e. either avail physical increases or decreases. I've tried the update method by testing through Movement Journal Post but it doesn't call the update method after the Posting is done, any ideas ? I actually want to run some logic once the avail physical changes regardless of the trigger of change.

Thanks,

*This post is locked for comments

I have the same question (0)
  • AbdulKhaliq Profile Picture
    160 on at

    Thanks Crispin,

    I actually tried the InventSum.Update method but it gets called only before the Posting not after, which is the reason the Avail Physical value that I get is the one that is not updated yet.

    Regards,

  • Verified answer
    Mariano Gracia Profile Picture
    on at

    AX updates InventSum executing a progress sql instruction, you can take a look at the method sqlUpdateInventSumStr from the InventUpdateOnhand class (I have modified this method some times in the past), the method updateInventSumAdvanced is the method that provokes the changes in the InventSum

  • AbdulKhaliq Profile Picture
    160 on at

    Thanks Mariano, your suggestion seems to be working but there is just a tiny little thing that I need to confirm, is there a way to check if the AvailPhysical value has changed only then it runs my code otherwise not, the reason for this is, when I post a movement journal, my code runs for a couple of times instead of one.

    Thanks,

  • Mariano Gracia Profile Picture
    on at

    I don't think you will be able to check if AvailPhysical has changed as this method executes a single sql instruction that can updates multiple InventSum registers

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