Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Put a newly created or...
Finance forum
Suggested answer

Put a newly created or modified sales order on hold via code

Posted on by
Hi ,
 
I'm new to D365 F&O x++ development & customization.
I have a requirement below:
 
Need to put newly created sales order or modified sales order on hold .
1. If order receipt date is changed or new sales line is added by clicking on save the logic to put order on hold will run.
2. Logic will be decided via lead time & requested receipt date
          If requested receipt date - order created date < lead time then put order on hold otherwise order can be processed further like confirmation & packing slip.
Lead time setup will be defied separately based on customer group & released product via extension.
 
Can you please tell me where i can write the x++ logic put order on hold & the some x++ code sample if possible ?
 
Thank you.
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 3,252 on at
    Put a newly created or modified sales order on hold via code
    Hi,
     
     Let us simplify the requirement. You can start by adding new method on the have the logic (to check if the order should be put on hold or not). Your new method will return Boolean.


    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
    ​​​​​​​

     
  • Waed Ayyad Profile Picture
    Waed Ayyad 3,252 on at
    Put a newly created or modified sales order on hold via code
    Hi
     
     

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

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,860 Moderator

#2
Ludwig Reinhard Profile Picture

Ludwig Reinhard Microsoft Employee

#3
Martin Dráb Profile Picture

Martin Dráb 225,155 Moderator

Leaderboard

Product updates

Dynamics 365 release plans