how to disable new and delete buttons in standard forms

 [FormEventHandler(formStr(SalesTableListPage), FormEventType::Initialized)]

public static void SalesTableListPage_OnInitialized(xFormRun sender, FormEventArgs e)

{


FormDataSource tablename_ds = sender.dataSource('TableName');


tablename_ds.allowDelete(false); //to disable delete button


tablename_ds.allowCreate(false);  //to disable new button

}



salesTable_ds.allowEdit(false); //to disable save button

}


}

Comments

Popular posts from this blog

how to post trade agreement journals automatically using x++ code

How to Create a wizard in x++ d365

x++ code to submit and approve and reject the invent movement workflow in d365 F&O