My requirement is to disable the delete button for journals that were posted:-
After Posting the button is enabled fig:-
[ExtensionOf(formDataSourceStr(InventJournalMovement,InventJournalTable))]
internal final class DAXInventJournalMovement_Extension
{
public int active()
{
int ret;
FormCommandButtonControl delete, removeLine;
FormRun formRun = this.formRun() as FormRun;
InventJournalTable inventJournalTable= formRun.dataSource().cursor();
#SysSystemDefinedButtons
ret = next active();
delete = formRun.control(formRun.controlId(#SystemDefinedDeleteButton)) as FormCommandButtonControl;
removeLine = formRun.design().controlName('RemoveLine');
delete.enabled(inventJournalTable.Posted == NoYes::No);
removeLine.enabled(inventJournalTable.Posted == NoYes::No);
return ret;
}
}
-----------------
output Header:-
No comments:
Post a Comment