This is posts shows that how to enable disable or show hide system defined button on Form
FormCommandButtonControl attachButton; public void init() {
super(); attachButton= this.control(this.controlId( attachButton.visible(false); }
public void init()
{
this.form().design().showNewButton(0);
this.form().design().showDeleteButton(0);
super();
}
[ExtensionOf(FormStr(InventBatch))]
public final class P_InventBatchForm_Extension
{
void run()
{
next run();
inventBatch_ds.allowCreate(false); // Disable System Defined NEW Button
}
}
ref: - System-defined buttons - Finance & Operations | Dynamics 365 | Microsoft Docs