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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Enable Button Based on PO Status and Focus

(0) ShareShare
ReportReport
Posted on by 730

Hi All,

Could you please advise where and how to enable the following functionality:

  1. "Create Journal" (#1) Button should become active only when both following conditions are met:
    1. Purchase order should be selected (#3).
    2. The selected purchase order must have "Open order" status (#4).

  2. If both of the above mentioned conditions are not met then the "Create Journal" button should be disabled like "Intercompany Picking List" (#2)
  3. What type of button, should the "Create Journal" (#1) Button be:
    1. Command Button?
    2. Menu Item Button?

PO-Selection.png

Many thanks, in advance!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,029 Most Valuable Professional on at

    Command buttons are used for standard action such as creating records and closing the form, but here you need custom logic, therefore a command button isn't a feasible choice. You could use a normal button and run some logic on click, but a menu item button is usually a better solution.

    You want to re-evaluate the condition when you switch to another order, therefore you should do it from active() method of PurchTable datasource.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans