Announcements
No record found.
Hi All,
I want to call the super in class extension .
Ex:super(_formControl, _filterStr);
How to I call this code in Extension Class.
It Would be great for your replay
Thanks
Arun Joseph A
*This post is locked for comments
Hi Arun
If you extend a class you can override the functions, for example when you develop reports you extend the SRSReportDataProviderBase when you create your DP Class and override processReport() method.
The next may help you.
Noticed that both functions must have the same sign (parameters)
Class Main()
{
public void mainfunction(VendAccount _account)
// Do something for main function
}
Class Child extends Main
super();//execute the mainfunction for mainclass
// Do something for child function
I hope this is what you are searching.
Regards
Jose Fuentes
Hi Jose ,
Thanks for your reply.
For my Scenario:
public int active()
int ret;
ret = super();
return ret;
I want to Create the Extension class in D 365:
In extension class it did not to allow the super() call.
when I declare the super() its throws error in extension class.
Please help !
How to declare the super() in extension class.
Is there another way to call super() in class extension in D 365.
For EX:
[FormDataSourceEventHandler(formDataSourceStr(LedgerJournalTransCustPaym, LedgerJournalTrans), FormDataSourceEventType::ValidatingWrite)]
public static void LedgerJournalTrans_OnValidatingWrite(FormDataSource sender, FormDataSourceEventArgs e)
Super()// super not allowed here...
For what type of object do you want to create this class? Form, Table or another class?
If is a class the example that I've posted may help you, but it is another type of object you have to use eventhandlers, obviously the function will execute after or before (I think that would be the "super()" function that you are searching), depending of the event,
You may check next post
community.dynamics.com/.../ax7-extensibility-part-3-event-handlers-and-delegates-hooks
Regards.
Jose
Thank You.
Ya its throwing error.
public int active() { int ret;
if (mcrAllowPayment) { // Written some business logic}
if (ret)
//Extension code .. call event handler extension class
In This how it will possible.
[FormDataSourceEventHandler(formDataSourceStr(LedgerJournalTransCustPaym, LedgerJournalTrans), FormDataSourceEventType::Activated)] public static void LedgerJournalTrans_OnActivated(FormDataSource sender, FormDataSourceEventArgs e) {
// How can i call here. if super extecuted here:
CustVendNACHAIATInfoTable_US.enabled(CustOutPaym_NACHA_IAT::isIATNACHAFormat(ledgerJournalTrans.PaymMode)); // this code want to executed. }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.