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

Announcements

No record found.

News and Announcements icon
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)
  • 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?

  • 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

    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,

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans