Hi,
I have a condition to disable few buttons until a record is created in that form. In order words, when the selects the existing record or when the user creates a new record, the button should be visible or enable.
Consider the button names as open and close.
Thanks.
Hi C4u,
Great, you got help from the forum.
Please, do verify the replies that were helpful, by clicking Yes(Did this answer your question?)
Thanks to everyone for supporting me to implement this.
Regards,
C4u
You can check this article
Refer to the below code.
[ExtensionOf(formdatasourcestr(FornName, DataSourceName))] // Extension of Standard Obejct final class ClassName_Extension { public int Active() { int ret; ret = next Active(); TableName tableName = element.tableName; if(tableName) { buttonname.enabled(true); } else { buttonname.enabled(false); } return ret; } }
Thanks,
Girish S.
If you want to write the extension of active, you need to write it as formdatasourcestr as the method is found at form datasource level. You cannot find this method at table level. You can simply follow the link which Girish shared.
I am getting quite a lot of error. Whether this method can be written in a class where the first line is extensionof(tablestr("Specific data source name")). Can you provide me a sample code of lines for this active method ?.
Hi,
Refer to the below blog for using active method with COC.
http://axaptaworld-saklani.blogspot.com/2021/01/d365-f-call-active-method-through.html
Thanks,
Girish S.
This article shows the event handler right, can you provide inputs over coc ?
If your requirement is on a custom form then you don't need CoC or event Handler as you can directly override those form methods. However, if it's a standard form then please check this article
Can you help me with the sample code for these 2 methods ?
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156