Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

How to make use of BudgetControlProcessor for PO ?

(1) ShareShare
ReportReport
Posted on by 508
Hi guys,
 
I want to check my PO when it is create /automatically/ from Web API. So the logic is this Web API will trigger PO creation, and while inserting each the Purchase Lines, I want the code to also run Budget Checking.
May I know how to implement this ?
 
I was told that I need to make use of class BudgetControlProcessor, however I have limited knowledge about how to use it exactly.
 
Basically, when it does not have budget during this processing, The Web API should return /false/. I know how to return the API to false, what I don't know is how to do check Budget according to my Budget Register Entry.
 
Thanks.
 
  • Ken Manhattan Profile Picture
    Ken Manhattan 508 on at
    How to make use of BudgetControlProcessor for PO ?
    Hi Kevin,
     
    Yes, that exactly what I have in mind, but don't know how to make use of that BudgetControlProcessor. And to do reverse engineering to what standard doing, unfortunately is beyond my skill. 
     
  • Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    How to make use of BudgetControlProcessor for PO ?
    Hi,
    Regarding what you said about running the check code after creating a PO through the API, you need to integrate the BudgetControlProcessor class for budget checking in the code that handles the purchase order creation and purchase line insertion. If the budget check fails, you can return false from your web API to indicate that the purchase order creation process has experienced a budget overrun.
    Best regards,
    Kevin
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,791 Super User 2024 Season 2 on at
    How to make use of BudgetControlProcessor for PO ?
    Hi Ken,
     
    I also don't have experience in calling the budget checks from X++ coding. 
    To be able to learn more about what class and method to use, you can reverse engineer the form design of the purchase order details. You can then check how the budget check is executed.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,791 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,488 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans