Hello Guys, a the simple question.
I need add new method in the datasource of the extension form. it´s possible?
I have searched various forums but have not found the answer to the question. To clarify, I don't want to override any method, I want to add a custom method.
I'm sorry if the question is basic, but honestly I'm new and I don't know how to do it.
From already thank you very much.
Hi Angel,
Display method should rather be written on the table extension.
I have added a method from the extension.
[ExtensionOf(formStr(TaxTmpWorkTrans))] final class NXRTaxTmpWorkTransFrm_Extension { Display String30 displayMethod(TmpTaxWorkTrans _TmpTaxWorkTrans) { return TaxTable::find(_TmpTaxWorkTrans.TaxCode).field; } }
but when I call it from the properties of the datamethod in my form control, it tells me that the method does not exist.
Hi,
Yes, you can add it via COC of form DataSource.
[extensionof(formDatasourceStr(formName,DataSourceName))] Internal final class FormName_Extension { public void method1() { //you can call this method anywhere using datasource buffer. Dont look for Intellisense to show the custom method. Just type in the method name and it will work. } }
Thanks,
Girish S.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156