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
Post a Comment