Tuesday, July 11, 2023

Code to enable/disable buttons for movement journals in D365 X++

 

[ExtensionOf(formStr(InventJournalMovement))]

internal final class DaxInventJournalMovementForm_Extension

{

   public void initDatasourceAllow()

   {

       InventJournalTable  inventJournalTableloc = inventJournalTable_ds.cursor();

       next initDatasourceAllow();

       if(inventJournalTableloc.Posted == NoYes::Yes)

       {

           inventJournalTable_ds.allowDelete(false);

       }

       else

       {

           inventJournalTable_ds.allowDelete(true);

       }

   }

}

Output :



Other Way :
https://daxingwithakhilpatel.blogspot.com/2023/07/disablestandredbutton.html




No comments:

Post a Comment