AX 2012 R3 – How to Enable Button Based on PO Status and Focus

  • AX 2012 R3 – How to Enable Button Based on PO Status and Focus

    Posted by DSC Communities on January 3, 2017 at 1:47 pm
    • Marina Savche

      Member

      January 3, 2017 at 1:47 PM

      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?

      vDPbRlElTV2BndK69MtE_PO Selection.png
      Many thanks, in advance!

      ——————————
      Marina
      ——————————

    • Tony Zeigler

      Member

      January 4, 2017 at 8:23 AM

      Menu item button should be fine, as you can launch the menu item for creating a journal using parameters rather than code then.

      The trick is putting logic in the row onactivate event to enable/disable the button appropriately. Make sure the button is set Autodeclaration = true, and Enabled = no.  Then you can refer to it in the onactivate event of the grid, and do a test on the record selected’s status. If true, set to Enabled=yes, else no.

      ——————————
      Tony Zeigler
      Strategic Solutions NW, LLC
      Beaverton OR
      ————————————————————————-

    • Corey Vantilborg

      Member

      January 4, 2017 at 8:11 AM

      Marina,

         In order to change the state of the button in that example you want to use this method of the listpage interaction class: ClassesPurchTableListPageInteractionsetButtonEnabled.  You can see some of the other methods inside this which actually run logic.   You can use normal form methods on other forms to accomplish the same.

          You want to use menu items for your custom stuff.

      ——————————
      Corey Vantilborg
      ERP Analyst
      Tigercat International Inc.
      Brantford ON
      ————————————————————————-

    DSC Communities replied 7 years, 4 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘AX 2012 R3 – How to Enable Button Based on PO Status and Focus’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for people  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!