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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Setup a workflow for a sales order

(2) ShareShare
ReportReport
Posted on by 8
I'm trying to set up a workflow in D365 so that any sales order containing specific products will require prepayment before processing. Ideally, the workflow should identify these products and place the order on hold until a prepayment is invoiced and received. Can someone guide me through the setup or best practices for configuring this?
Categories:
I have the same question (1)
  • Suggested answer
    whitebeard Profile Picture
    97 on at

    Hi @CU31122019-0,

    Since Dynamics 365 Sales (CRM) does not have the native "Order Hold" functionality found in Finance & Operations, you will need to implement a custom logic flow.

    To achieve this specific requirement (Trigger based on Product -> Hold -> Release based on Invoice Payment), I recommend a hybrid approach using Power Automate for the logic and a Real-Time Workflow (or Plugin) for the enforcement.

    Here is the step-by-step implementation plan:

    1. Data Model Changes

    You need fields to track the status.

    • Order Table: Create a Two Option field new_isorderonhold and a Choice field new_holdreason (e.g., "Awaiting Prepayment").
    • Invoice Table: Create a Two Option field new_isprepayment to distinguish this invoice from others.

    2. Set the Hold (Power Automate)

    Create a cloud flow triggered When a row is added (Table: Order Lines).

    • Condition: If the productid matches your specific product(s).
    • Action: Update the parent Order record. Set new_isorderonhold to Yes and Reason to Awaiting Prepayment.

    3. Enforce the Hold (Blocking Logic)

    Power Automate is asynchronous, so it cannot stop a user from clicking "Fulfill Order" instantly. To strictly prevent the order from moving forward, use a Real-Time Workflow (or a Plugin if you are a developer).

    • Trigger: Before Status Change (to Fulfilled).
    • Condition: If new_isorderonhold equals Yes.
    • Action: Stop Workflow with status Canceled.
    • Result: This will display an error bar to the user saying they cannot fulfill the order until the hold is lifted.

    4. Release the Hold (Power Automate)

    Create a cloud flow triggered When a row is modified (Table: Invoices).

    • Condition: If statuscode changes to Paid AND new_isprepayment is Yes.
    • Action: Get the related Order and update new_isorderonhold to No.

    This architecture ensures the hold is applied automatically and removed only when the finance condition is met, while the synchronous workflow ensures no one bypasses the hold manually.

    Hope this helps!

  • CU31122019-0 Profile Picture
    8 on at
    Thanks @iampranjal 
     
    Can you please confirm if the same steps are valid for D365 F&O as well?
  • whitebeard Profile Picture
    97 on at
     

    No, the steps I outlined above are not valid for Dynamics 365 Finance & Operations (F&O).

    My previous answer was specific to Dynamics 365 Sales (CRM/CE), which runs on Dataverse. F&O operates on a different architecture, so the tables and "Real-Time Workflow" logic do not apply there.

    Thanks,

    Pranjal

  • Mansi Soni Profile Picture
    10,000 Super User 2026 Season 1 on at
    Hello @CU31122019-0,

    Moving your question from Dynamics 365 General Forum to Dynamics 365 F&O Forum for better reach.

    Regards,
    Mansi Soni
  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 1 on at
    Hi,
     
    This needs a custom workflow in the D365 FO. Do you in-house expertise for development or yourself being a technical person?
     
  • CU31122019-0 Profile Picture
    8 on at
    Thanks @Sohaib Cheema

    We do not have in-house development expertise related to D365 F&O.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 628 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 612

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 589 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans