Announcements
No record found.
Hello,
Does anyone have sample CRUD operations written in C# that they can share? Specifically I have a requirement that I create two child Customer records after a parent customer record has been created.
Any help appreciated.
Any particular reason why you want to develop in C# rather than x++? Is it because you are integrating from external system and your C# code is used in this external system? If yes, how are you integrating to D365FO? That has a big impact on how the code should look.
It can be X++, but I was under the impression that X++ will eventually become deprecated.
If you are able to share X++ CRUD operations that is also great. I am hoping to bind my code to an event handler.
No, x++ is definetely not going to be deprecated in the foreseeable future. The entire application is written in x++! Rewriting it in C# would be an enormous effort and not provide any business value to customers so I don't think you need to think about that when developing your customizations today.
Check the official documentation to learn more about CRUD operations: docs.microsoft.com/.../updating-deleting-and-inserting-data
It's for AX2012 but perfectly valid for D365FO, too.
Hi pnixon,
You can put your codes in the 'OnInserted' event handler of CustTable like this.
[DataEventHandler(tableStr(CustTable), DataEventType::Inserted)] public static void CustTable_onInserted(Common sender, DataEventArgs e) { CustTable custTable = sender as CustTable; }
And see the Blog about how to create customers by X++.
https://community.dynamics.com/365/financeandoperations/b/365foandaxtechnicalworld/posts/create-customer-using-x-d365fo-amp-ax-2012
Hope this helps.
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 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 658
André Arnaud de Cal... 468 Super User 2026 Season 1
Syed Haris Shah 333 Super User 2026 Season 1