Contents tagged with Enable

  • How to enable disable menu item in Acumatica

    Hello everybody,

    Today I want to share short glimps how to Enable/Disable menu item. Let's some menu. For example it looks like this:

    Suppose, we added menu action Activate in the following way:

    public PXAction<EPEmployee> Activate;

    [PXButton]

    [PXUIField(DisplayName = "Activate")]

    protected virtual IEnumerable activate(PXAdapter adapter)

    {

    }

    // menu action was added like this:

    public override void Initialize()

    {

    Actions.AddMenuAction(Activate);

    }

    Let's say we want to disable menu item Activate. It can be achieved with usage of RowSelected event and SetEnabled function.  In my case I used the following construction:

    protected virtual void EPEmployee_ … more