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
David,
Would you know anything from the functional side where it is already present to do? Instead of manually changing it?
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.
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?
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?
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156