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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Auto-update the warehouse on PurchTable and PurchLine for all the Purchase orders

(0) ShareShare
ReportReport
Posted on by 1,260

Hi all,

Is there a way to update all the Purchase Order warehouse for both header and lines using a SQL query or Batch job.

We had a previous modifications where we showed the warehouse as 234PO instead of manufacturing warehouse 234M. But now the Retail companies needs it to rollback and have the warehouse as 234M as well.

When I do manually one by one for the Purchase order i.e. change the warehouse on header as "234M" and then update the lines as "234M" this takes lots of time. I have to perform this on all the Purchase order that is already present in AX.

I know it updates InventTrans table and others but is there any handy code or SQL command that I can use it for temporary use and update all the warehouse on the Purchase order header and lines.

*This post is locked for comments

I have the same question (0)
  • Daljit Kaur Rahsi Profile Picture
    1,260 on at

    David,

    Would you know anything from the functional side where it is already present to do? Instead of manually changing it?

  • Community Member Profile Picture
    on at

    WOW - that is a lot of lines :)

    I would suggest you need some professional development support and plenty of testing. One problem with Jobs (the code) is that they can do A LOT of damage VERY quickly in the wrong hands. Im not a developer im afraid.

  • Daljit Kaur Rahsi Profile Picture
    1,260 on at

    David,

    I need to update the header and lines all at once for all the Purchase order instead of manually updating them. I have over 127890 header (lines are separate) that needs to be updated.

    Is there X++ code or anyone had worked before as this is a temporary change if you can provide that to me?

  • Community Member Profile Picture
    on at

    Never use SQL updates :)

    You can set the 'Update order lines' parameter to update all the lines from updating the header - if set to always, this will update the lines (assuming all lines are the same as the header!!).

    You could have a job written in x++ following the logic that the user interaction.

    How many headers/lines are you talking about? Hundreds or thousands?

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

News and Announcements

Season of Giving Solutions is Here!

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
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans