Form Data Source Method override COC D365FO
Here is the sample how can you override the form data-source event.
In this demo we have created the extension of HcmWorker form data-source (HcmWorker).
Here is the original method of HcmWorker data-source
public boolean validateWrite()
{
boolean ret;
ret = super();
if (ret)
{
partyForm.validateWrite();
}
return ret;
}
Here is the code to create form data-source extension class
[ExtensionOf(formdatasourcestr(HcmWorker, HcmWorker))]
final class Demo_Extension
{
}
Here is the code to override the data-source method through COC.
[ExtensionOf(formdatasourcestr(HcmWorker, HcmWorker))]
final class Demo_Extension
{
public boolean validateWrite()
{
boolean ret;
ret
= next validateWrite();
if (ret)
{
/// do your code here
}
return ret;
}
}
In last perform Build & Sync.
Important
Feature available from Build 8.1 PU-20
No comments:
Post a Comment