Notifications
Announcements
No record found.
Hi Experts,
Hi Phani AX2012,
which version are you asking about? You posted in D365 forum, but used tags ax2012 and Dynamics 365?
In AX2012 you can't write such extensions.
In D365FO you can use Chain of Command, check this doc page: docs.microsoft.com/.../method-wrapping-coc
www.arbelatech.com/.../dynamics-365-finance-operations-chain-of-command-new-features.html
Hi Ergun,
Thanks for replying very fast.
How to create new method under forms , datasources and fields inside the datasource for an exsting form. I have gone through link which is explaining for existing methods extension.
Can you please help on this.
Thanks,
Phani
anithasantosh.wordpress.com/.../
Hi Phani,
you can use Chain of Command to create new methods on objects. The syntax is exactly the same! The only difference is that you don't call next because there's no base method that you would call.
Hi Nikolaos,
Thanks for coming forward to answer this question.
Do I need to create separate xpp file in d365 for the methods that are under forms and data sources and fields in the extended form. Please confirm?
You can add newMothod in COC, and call that. Just dont forgot where are you creating method (form or ds or on a field)
Sorry I could not able to catch your point here. I need to create a new method under the existing data source of existing form . How do I achieve this, Same way for existing fields. do i need to create separate class xpp files for ds and fields .
Each form data source, form control etc is a separate class and you need to create separate extension classes.
[ExtensionOf(formDataSourceStr(SalesCreateOrder,SalesTable))] final class SalesCreateOrderDataSource_Extension { public void write() { next write(); FormDataSource formDS = this; SalesTable salesTable = formDS.cursor();; this.setIsManualCreated(); } public void setIsManualCreated() { salesTable.IsManualCreated = true; } }
Instead of using COC for this case, Creating a event handler makes more sense, but the usage is that way.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 449 Super User 2025 Season 2
Martin Dráb 422 Most Valuable Professional
BillurSamdancioglu 239 Most Valuable Professional