How to enable/disable delete or new button on form in D365. #x++ #Dynamics #D365
Views (237)
Here is an example of how you can enable/disable delete or new buttons on a form based on some conditions. In the standard form, the delete button was disabled, so I created an extension class of that form and wrote my code to enable the delete button.
[ExtensionOf(formStr(PayrollJournalLog))]
public final class PayrollJournalLog_Form_Extension
{
/// <summary>
/// Coc of init()
/// </summary>
public void init()
{
next init();
PayrollJournalLog_ds.allowDelete(true);
}
}
*This post is locked for comments