Add eneity to the form d365fo x++

Add eneity to the form d365fo x++

 public void init()
    {
        FormRun formRun = this as FormRun;

        if(formRun)
        {
            OfficeFormRunHelper officeHelper = formRun.officeHelper();

            if(officeHelper)
            {
                officeHelper.OfficeMenuInitializing += eventhandler
                    (this.officeMenuInitializingHandler);
            }
        }
        super();
    }

    public void officeMenuInitializingHandler(FormRun _formRun, OfficeMenuEventArgs _eventArgs)
    {
        // Add an entity to the list
        OfficeMenuDataEntityOptions entityOptions = OfficeMenuDataEntityOptions::construct(tableStr(DSPEmployeeOvertimeJournalEntity));

        _eventArgs.menuOptions().dataEntityOptions().addEnd(entityOptions);

    }

Comments

Popular posts from this blog

D365FO – AX – X++ –Refresh, Reread, Research, and ExecuteQuery

Create Inventory Journal through Code in D365FO X++

SalesLine Reservation in D365fo x++