web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Writing business logic in C# instead of X++

(0) ShareShare
ReportReport
Posted on by 5

I'm starting to learn X++ for the cloud version of F&O and found this page on the Microsoft docs site. I got it working and it seems great but I never see any posts about people using this approach. Has anyone run into any major disadvantages or know any reasons why I should avoid it?


Thanks

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    235,876 Most Valuable Professional on at
    RE: Writing business logic in C# instead of X++

    The usual use case for writing C# libraries is when you want to use an existing .NET API (for example, you want to consume external web services, you want to talk to Azure services, you want deserialize JSON to objects, you want to parse files with LINQ etc.).

    If you consider creating a C# library and writing queries in LINQ, ask yourself what advantage would it bring to you. If you can simply write a query in native X++, it's clearly much less work, less things to manage and deploy, fewer boundary crossings (the interoperability has its quirks), you can utilize all X++ features and functions (the LINQ provider is limited in this respect), you'll be able to find objects by references in Visual Studio and so on. You would need strong arguments for giving up all these advantages. If you can do everything in X++ and you don't need to fetch data from AX to a .NET library for further processing, moving your business logic to C# doesn't sounds like a good idea.

  • Verified answer
    Khushhal Garg Profile Picture
    1,514 on at
    RE: Writing business logic in C# instead of X++

    There is one more layer you are adding to read data or accessing objects from F&O. It is not a best practice either. I think there will be performance impact due to extra layer of DLLs.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 745 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 597 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 580 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans