User need to display button based on two menuitems but form name is same .

If the user need to display button based on two menuitems but form name is same 

Menuitem = CustInvoiceJournal(Free text invoice)
                     CustInvoiceJournal_Action(Sales Invoice)
Form name = CustInvoiceJournal.

In Form -> Init() -> write code.

if(element.args().menuItemName() == menuitemDisplayStr(CustInvoiceJournal_Action))
    {
        FCC_SOInvoiceReport.visible(false);
        info("FCC_SOInvoiceReport False");
    }
    else
    {
        FCC_SOInvoiceReport.visible(true);
        info("FCC_SOInvoiceReport true");
    }

Comments

Popular posts from this blog

Getting Workflow Approvers In Dynamics AX (AX 2012)

To find details individually for ledgerjournaltrans default dimensions

Creating a numbersequence in form level in ax 2012