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

Notifications

Announcements

Community site session details

Community site session details

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

How to get budget check result using x++ ?

(1) ShareShare
ReportReport
Posted on by 596
Hi guys,
 
Can we retrieve Budget check result from PO creation using X++ ?
I have created PO which created also using x++, when the PO created I can see the Budget checking result is actually false. There is also a standard warning from D365 saying no budget ->
 
How to retrieve this check result ? is there an existing class for us to use instead ?
 
Thanks.
I have the same question (0)
  • Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at
    I would start by looking at where the warning came from.
  • Voltes Profile Picture
    596 on at
    I'm sorry, but your reply is too general.
    When we ask, we are also expected to be more concise and detail what are we asking, right ?
    I believe the answer also expected to be more helpful if to be more precise what should we do, instead just "follow the warning".
    Thanks.
  • Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at
    Okay, I told you what approach I would use to make a progress on the problem. If you don't want to learn how you can solve problem on your own and you want to passively wait for someone to resolve it for you, then please except my apology and keep waiting.
     
    Otherwise you can use my suggestion to find the object in question. Maybe it'll tell you all you need, or you'll at least will be able to ask a more specific question. If you did some basic analysis before asking here, we'd have more information to work with.
     
    And if you don't know how to find out where the error was thrown from, you can simply ask and I'll explain it to you.
     
    The choice is up to you.
  • Voltes Profile Picture
    596 on at
    Yes, but some of us (if not most of us), came here to resolve thing in due time. The learning is fine and appreciated, but it does takes time which not everyone has the time. Also, nowadays, there are plenty of apps, which not everyone can have the same skill level as someone that has the privilege on doing F&O development only, means even to follow "how it start" and how this F&O actually work, we already got lost. So even if I start asking where to go and what to do from the beginning it will be many back and forth discussion which will be excessive.
     
    so, I believe if it goes straight to what the problem is will be more effective. However, I really appreciate your intention, although there are times when we want to understand the problem or learn it, but since it is already resolved, there is no more response, especially when the thread already marked as resolved. So yeah, it is "chicken and egg" thing.
     
    Apologies as well, but sometime work due makes people want to resolve it quickly, and learn later when it is resolved.
     
     
  • Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at
    All right, so you don't have time to work on a resolution of your problem and rather then collecting more information, you want to sit and wait for someone to do the work for you. You're not interested in any advice, just in the complete solution and you don't want anyone to respond to you with mere advice or a request for more information from you. I'm very sorry; I didn't know it. Please wait for someone else willing to help you.
  • Voltes Profile Picture
    596 on at
    I'm not saying I'm not interested in advice or request a more information, in fact I do expect a "valuable" question that asking to the exact problem. And I believed, from the start of this thread I have mentioned about Budget Checking and whether F&O have an existing function or class. This I believe can be a start of "problem solving" it self since I had narrow it down to the point of failing. The discussion can then start from there rather than a general response of "check the warning".
     
    Even if someone give a "straight to the problem" answer, there will be further question again from me, so that's why I already narrow it down, and I spend my time to debug this and learn it with my limited knowledge in order to narrow it down. So it is not that I don't want to do the hard work and just sit back and wait someone else to solve. Again, even if someone response with something, it is not automatically I can use it, that's when the "problem solving" discussion start.
     
    And it does not intent to specific person, so if one does not feel like response to help by resolving it, by all means, don't. It is not your obligation. Because by this "manner", this thread already a garbage and no one even want or interested to response anymore. So, you're response make my thread a trash while actually I need help, now I cannot even make a progress.
     
    TQVM.
  • Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at
    I don't think that I ruined this thread by suggesting that looking at where the error was thrown is a way (or at least the first step) how to get your question answered. I also think it didn't prevent you on making progress. In my opinion, it's does it opposite - it tells you what you can do to make progress. Maybe you'd be able to answer your question by yourself, or you'd at least collect more information to share with us, to make it easier for us to help you. You said you didn't have time for it, but your replies tell me that you did have a minute to spare.
  • Voltes Profile Picture
    596 on at
    Yes, the amount of time wasting by replying this, is unbearable. I knew it from the start.
    That's why I'm looking for something more "straight to the point" answer.
     
    And while replying this, I'm still searching for what happened, by debugging, but as mentioned, I already narrow it, so i think rather then "check the warning", we can start from there.
     
  • Martin Dráb Profile Picture
    238,534 Most Valuable Professional on at
    I guess it means that you don't know how to check where the error came from. Although you "don't have time to learn" and you're offended by my suggestion, let me give you a piece of advice anyway.
     
    When you see an exception in debugger (e.g. when execution stops on an unhandled exception), you can look at its StackTrace property to see where it was thrown and also what calls led to it. Another approach is starting debugging at the place where the message is added to infolog: in Info.add().
  • Suggested answer
    munsif Profile Picture
    1,536 on at
    Hi, 
     
    Recently I had chance to create PO using x++, there is a method in purchline table named displayBudgetcheckResult you can check it, or if you need to create the same cross or Ok symbol using x++ code when any PO line is has been created, then be sure your budget setup has been completed.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 605 Super User 2025 Season 2

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 437 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 348 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans