Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Planning Optimization (Batch Job to Delete Planned Orders)

(2) ShareShare
ReportReport
Posted on by 4
Hello Everyone,
 
I am a production scheduler, and we just switched to planning optimization in D365 F&O.  Previously, each night MRP would run and delete all the planning outputs but after we switched to optimization nothing in our frozen time fence will be deleted and they just pile up.
 
 am trying to figure out if there is a batch job solution that would delete all of the planning outputs each evening.
 
Thanks!
 
 
 
  • Suggested answer
    Guy Terry Profile Picture
    28,720 Super User 2025 Season 1 on at
    Planning Optimization (Batch Job to Delete Planned Orders)
    That CoPilot answer is awful.... there is no Delete Planned Orders function in F&O.
     
    Master planning has never automatically deleted Planned orders which sit within the Freeze Time Fence. For example, see this blog post that refers to AX 2012
     
     
    I'm not sure how these planned orders were getting deleted before; perhaps pre-Planning optimisations environments had a separate job to delete planned orders (I don't have one available to check). There was one job available called 'Delete plan', which would have done what you wanted, but it's not supported with Planning optimization.
     
     
  • Suggested answer
    Navneeth Nagrajan Profile Picture
    1,635 Super User 2025 Season 1 on at
    Planning Optimization (Batch Job to Delete Planned Orders)
    Hi LF-01051753-0,
     
    1. When planned optimization is enabled, you still have access to the Master Planning workspace under Workspaces -> Master planning.


     
    2. Under master planning workspace you can still have a look at the firmed planned orders and delete them manually or choose to write a custom batch in X++ that will delete the firmed planned orders from tables ReqTrans, ReqTransFirmLog, ReqTransCov, ReqPlanVersion etc.
     
    Out of the box there is no standard batch to delete the planned orders, however the batches to firm planned orders exists.
     
    Hope this helps. Happy to answer questions, if any.
  • Jonas "Jones" Melgaard Profile Picture
    3,999 Super User 2025 Season 1 on at
    Planning Optimization (Batch Job to Delete Planned Orders)
    All planned order clean-up jobs in D365 F&O will be deactivated when planning optimization is enabled, and it should do the clean-up for you.
    When did you do the switch to planning optimization? Just now. I wonder how old these planned orders are.
  • Suggested answer
    Holly Huffman Profile Picture
    6,078 on at
    Planning Optimization (Batch Job to Delete Planned Orders)
    Good morning, afternoon, or evening depending on your location!
     
    Since Planning Optimization in D365 F&O works differently from traditional MRP, planned orders within the frozen time fence won’t be automatically deleted. However, you can set up a batch job to remove them manually.
     
    Solution: Batch Job to Delete Planned Orders
    1. Use the "Delete Planned Orders" Functionality
      • Navigate to Master Planning > Periodic Tasks > Delete Planned Orders.
      • Configure the deletion criteria (e.g., orders within the frozen time fence).
      • Set up a recurring batch job to run this process nightly.
    2. Automate with a Batch Job
      • Go to System Administration > Batch Jobs.
      • Create a new batch job and select the Delete Planned Orders task.
      • Schedule it to run at the desired time (e.g., every night).
    3. Check Planning Optimization Settings
      • Ensure that Planning Optimization isn’t retaining unnecessary planned orders due to time fence settings.
      • Adjust coverage groups to prevent excessive planned order accumulation.
    4. Alternative: Custom X++ Job
      • If the standard batch job doesn’t work as expected, a custom X++ script can be developed to delete planned orders based on specific criteria.
    For more details, you can check out Microsoft’s documentation on Planning Optimization job management.
     
    Please note: I teamed up with CoPilot AI to research and craft the best response to your question!
    Hope this helps some!

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Zain Mehmood Profile Picture

Zain Mehmood 241 Moderator

#2
Siv Sagar Profile Picture

Siv Sagar 111 Super User 2025 Season 1

#3
Danny Bilodeau Profile Picture

Danny Bilodeau 95 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans