03 April 2017

D365fO | change view edit mode of a form

To switch between view and edit mode of an AX form we used element.task() in AX 2012 (for details see: this post). In AX 7 alias D365 for Operations this is also possible, but the code looks different:

FormRun formRun = sender;
FormRunViewEditModeHelper viewEditModeHelper = formRun.viewEditModeHelper();
viewEditModeHelper.setViewEditModer(ViewEditMode::Edit);

Post a Comment