Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Where is the best CoC ...
Finance forum
Suggested answer

Where is the best CoC to do after PO status changing to Confirmed?

Posted on by 857
Hi dear community !
 
There is a customization that will run an Async batch job that will change the PO status to confirmed.
 
I want to add my logic after the PO status have been changed to "Confirmed".
I tried putting my logic as the next line after the line that will run the batch job I had an issue.
Because it's an Async batch job, some times my logic will run before the batch job have finished, so my logic will run before the PO status have been changed to "Confirmed".
 
So i'm wondering where to put my logic to run after making sure the PO status have been changed to confirmed.
 
I thought of using CoC to PurchTable.update() method, but I would prefer to not use the update method.
 
The batch job class and method being used to do the PO confirmation is "PurchFormLetter.update()".
 
Where should I put my logic to run after this batch job changes the status of the PO to confirmed?
 
Any advice is appreciated !
Thanks in advance !
 
 
Categories:
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,588 Super User 2024 Season 1 on at
    Where is the best CoC to do after PO status changing to Confirmed?
    You can check 
    Class name: FormLetterService
    Method name: postPurchaseOrderConfirmation.
     
    This the common class which is used for purchase order confirmation. Post next based on journal created, custom logic can be added
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 229,147 Most Valuable Professional on at
    Where is the best CoC to do after PO status changing to Confirmed?
    You can use the class actually posting the confirmation: SalesConfirmJournalPost. For example, you could utilize endPost() method.
     
    You can see the overall process in post() method of the parent class, FormletterJournalPost.

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

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,818 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,147 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans