Announcements
I need to diable button of post button of form below
The first crucial information is what form it is. If you look at it, you'll see that it's LedgerJournalTable - a common form for all kinds of ledger journals.
This form uses LedgerJournalFormTable class to control whether the Post button should be enabled. The decision is done in canLedgerJournalTableBePosted() method, therefore that's the place that you could influence. The method is wrappable, therefore you can use CoC to extend it.
Another option would be using extending enableButtonsActive(), especially if you want to create a subtype of LedgerJournalFormTable for this kind of journal and implement its specific logic there. You couldn't use canLedgerJournalTableBePosted() in this case, because it's final.
Hi Muhammad Zeesha,
You need to override the form datasource "OnActivated" event handler.
Get the form control and based on workflow status you can set visibility property.
Please go through the below url.
Thanks,
Girish S.
Yes workflow status field of selected record should be draft to hide the button
Hi Muhammad Zeeshan,
Is there a any specific condition to be written to show or hide the post button?
Also for event handler please go through the below url.
https://wingsraamax.blogspot.com/2019/03/preeventhandler-and-posteventhandler.html
Thanks,
Girish S.
André Arnaud de Cal...
294,251
Super User 2025 Season 1
Martin Dráb
232,984
Most Valuable Professional
nmaenpaa
101,158
Moderator