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, ...
Suggested answer

Server keyword in D365F&O

(1) ShareShare
ReportReport
Posted on by 567
Dear team,
 
I have explored the architecture and found that there is concept of
Server-side execution and Client-side execution in D365F&O
 
If any code executed in server will make good performance in application.
 
My question is--
 
1. Can I use server keyword in any custom class while work with CoC in extension class? 
2. Run on property set to Server in Menu item
 
Kindly elaborate please.
 
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    236,240 Most Valuable Professional on at
    Server keyword in D365F&O
    You contradict yourself. As you said, a DEV environment contains all three tiers, not just the browser (Tier-1). It contains the web server (Tier-2 according to your terminology) and the database server (Tier-3) as well.
     
    SQL Server is used on DEV environment only; sandboxes and production use Azure SQL (except of the on-premises deployment).
  • CU05031448-0 Profile Picture
    567 on at
    Server keyword in D365F&O
    Kindly validate please
  • CU05031448-0 Profile Picture
    567 on at
    Server keyword in D365F&O
    Thanks to everyone for the reply. So, what I understood about the architecture in DEV VM

    Client: When we interact with D365FO by opening a browser and navigating to the local environment's URL.
    Server: The request is sent to the AOS service running on the same VM.
    Database interaction: The AOS processes the business logic and interacts with the local SQL Server database.
    Response to client: The AOS sends the result back to the browser, which updates the UI accordingly. 
    So, I can say
    Tier-1 is Clent,
    Tier-2 is Server (AOS) and
    Tier-3 is Database.   (3 Tier architecture)
    All will be installed in DEV VM locally. So, the DEV VM we can say Tier-1 architecture.
    Kindly verify please
    Am I correct?
  • CU05031448-0 Profile Picture
    567 on at
    Server keyword in D365F&O
    Hi Sohaib, I took the answer from All as marked below in google search engine.
     
     
    Am i correct?
  • Suggested answer
    Anthony Blake Profile Picture
    2,700 Super User 2025 Season 2 on at
    Server keyword in D365F&O
     
    All X++ business logic is executed server side. In previous versions, 2012 and before, we could execute client or server, but the client is now a lightweight web front end.
     
    The front end Javascript etc in your google result is true, but we don't control it. We simply use predefined UI components in X++ which are compiled and displayed for us. We follow form patterns, and Microsoft ensures these are displayed correctly on all supported browsers and devices. It also allows MS to facelift the front end without the need for everyone to update their UI developments, by simply ensuring the facelift is compatible with the best practice form patterns.
     
    Hope this helps.
    Anthony
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,314 Super User 2025 Season 2 on at
    Server keyword in D365F&O
     
    Currently, X++ code is executed on the server side.
    If you want to execute the code x++ asynchronously it's possible, you can utilize using SysOperation framework with one of the asynchronous mode.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Sohaib Cheema Profile Picture
    48,602 User Group Leader on at
    Server keyword in D365F&O
    Hi,
     
    Was your search on Google from AI mode/answer? I would ignore it usually because AI can combine info from multiple online sources. Some of those sources can be very old. 
     
    It would make no difference if you will use the keyword Server in your class, because it is going to run on server anyway. Same with the menu item and any other objects. 
     
     
     
  • CU05031448-0 Profile Picture
    567 on at
    Server keyword in D365F&O
    Sohaib, Kindly clarify me please
  • CU05031448-0 Profile Picture
    567 on at
    Server keyword in D365F&O
    Hi Sohaib, I searched in google and got the below information :
     
    In a Dynamics 365 for Finance and Operations (D365FO) developer virtual machine (VM), not all code is executed exclusively on the server. The VM hosts a full-stack environment that includes both server-side and client-side code execution. 
    Server-side execution
    The majority of core business logic, database operations, and computationally intensive tasks in D365FO are executed on the Application Object Server (AOS), which is hosted on the developer VM. 
    • X++ code: Most X++ code, especially logic that interacts with the database (tables), runs on the server.
    • Batch jobs and services: Automated processes like batch jobs and integration services run as server-side processes, independent of user interaction.
    • Form logic: While the user interface is rendered in the browser, the underlying form objects and data retrieval logic run on the AOS. 
    Client-side execution
    Client-side code, primarily JavaScript, runs directly in the user's web browser and is used to control and enhance the user interface. 
    • UI interactions: JavaScript is used to handle client-side events, such as when a user clicks a button, changes a field, or loads a form.
    • Business rules: Client-side logic for dynamic field visibility, validation, and calculations can be implemented with business rules or JavaScript.
    • User experience: Customizations to the user interface, including the command bar, are handled with client-side code. 
  • Sohaib Cheema Profile Picture
    48,602 User Group Leader on at
    Server keyword in D365F&O
    Hi,
     
    It used to be in the past. Now all x++ code runs on the Server side.
     
    Where did you read about client side execution of the F&O app/code?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,258

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 631 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans