Top 200 Q&A in D365FO Technical
SECTION 1 — X++ BASICS (10 Q&A)
1. What is X++?
A proprietary object-oriented language used in Dynamics 365 Finance & Operations for business logic, similar to C# but integrated with D365 runtime.
2. What is a TableBuffer?
It is an in-memory object referencing a table. Example: CustTable custTable;
3. What is difference between select and select firstonly?
select → returns all matching rows
firstonly → returns only the first matched row
4. What is ttsbegin & ttscommit?
Used to wrap database transactions; ensures atomicity.
5. Can we write SQL queries directly in X++?
No. X++ uses a database-abstracted select statement.
6. What is a container?
A collection datatype used to store mixed data types.
7. Difference between container and map?
Map stores key-value pairs; container is indexed and immutable.
8. What is a temp table?
A table that stores data temporarily in memory or database depending on property.
9. What is recursion in X++?
A method calling itself. Used rarely because X++ has limited stack depth.
10. Can we extend a table and add code in new method?
Yes, using table extension + method extension (COC).
SECTION 2 — EXTENSIONS / COC (10 Q&A)
11. What is Chain of Command?
A method extension mechanism to wrap logic before/after the base method.
12. Can we call next more than once?
No. It must be called exactly once.
13. Can we override final methods in COC?
No.
14. Can we extend new() method?
Yes, using COC.
15. Can you wrap a private method using COC?
No, only public/protected methods are extendable.
16. What is event handler?
A delegate-based mechanism to subscribe to events.
17. Which is recommended — Event Handler or COC?
COC is preferred for business logic; events for UI & form customizations.
18. Can we use both event handler and COC together?
Yes, but not recommended.
19. Can we add fields using table extensions?
Yes.
20. Can we modify existing field properties?
No. You can only add new fields.
SECTION 3 — TABLES & DATA MODEL (10 Q&A)
21. Difference between InMemory and TempDB tables?
InMemory → stored in RAM
TempDB → stored in SQL tempdb
22. What is a surrogate key?
System-generated RecId.
23. What is a foreign key relation in D365FO?
A relation enforced in metadata between two tables.
24. Why use index hint?
To force SQL to use a specific index — rarely recommended.
25. What is delete action?
Controls what happens to child records when parent is deleted.
26. Types of delete actions?
Cascade, Restricted, Cascaded+Restricted, etc.
27. What is validTimeStateFieldType?
Enables date-effectivity.
28. What is a map?
Table-to-table mapping structure.
29. Difference between find() and exist()?
find() returns a record; exist() returns boolean.
30. Why use skipDataMethods?
Improves performance by skipping getters/setters.
SECTION 4 — FORMS (10 Q&A)
31. Difference between form init and run?
Init → initializes buffers
Run → starts form execution
32. What is datasource link type Active?
Refreshes joined datasource automatically.
33. What is form pattern?
UI layout guidelines enforced for consistency.
34. Can we override form control events in extension?
No; must use event handlers.
35. What is executeQuery()?
Executes the query on the form datasource.
36. Why use super() in forms?
To ensure base logic executes.
37. Can you add a new tab to form via extension?
Yes.
38. Can you override form data source method using COC?
Yes.
39. Why use display methods?
To show calculated values in UI.
40. How to validate fields?
Override validateWrite or validateField.
SECTION 5 — CLASSES (X++ OOP) (10 Q&A)
41. What is inheritance?
Using parent class features in child class.
42. What is abstract class?
Class that cannot be instantiated.
43. Difference between construct() and new()?
construct() returns instance (factory pattern)
44. Why use this()?
To call constructor chaining.
45. Can we run a class as job?
Yes, using RunnableClass.
46. What is SysOperation framework?
Used for batch-enabled logic with dialogs.
47. What is runAs()?
Executes code under different user session.
48. What is try/catch?
Exception handling mechanism.
49. Can we extend a final class?
No.
50. Can a class extend multiple classes?
No; X++ doesn't support multiple inheritance.
SECTION 6 — SSRS REPORTING (10 Q&A)
51. What is RDP?
Report Data Provider class.
52. When to use DP reports?
When complex business logic is required.
53. What is a Contract class?
Holds UI parameters for reports.
54. What is the UIBuilder class?
Customizes dialog UI.
55. How to refresh report dataset?
Use SrsReportDataProviderBase.preprocess().
56. Can we extend standard SSRS report?
Yes, via extensions.
57. What is prePromptModifyContract?
Customize report dialog before display.
58. What is Report Execution Mode?
Determines PDF, Excel, or screen output.
59. How to debug an SSRS report?
Attach debugger to AOS, set breakpoints in DP.
60. How to print report automatically?
Use print destination settings in controller.
SECTION 7 — DATA ENTITIES (10 Q&A)
61. What is a data entity?
Layer abstraction used for import/export.
62. Types of data entities?
Aggregate and Normal.
63. What is Staging table?
Intermediate table for DMF import.
64. What is OData?
REST-based data access for external use.
65. What is public collection entity?
Entity exposed via OData.
66. Can we customize standard data entities?
Yes, via extensions.
67. What is DMF?
Data Management Framework for import/export.
68. Can we use X++ code in Data Entities?
Yes, via events.
69. What is DefaultFieldGroup?
Auto-generates fields for entity UI.
70. How to enable entity for OData?
Set IsPublic = Yes.
SECTION 8 — SECURITY (10 Q&A)
71. What is a security role?
A bundle of duties + privileges.
72. What is a duty?
A task containing privileges.
73. What is a privilege?
Access to forms, tables, reports.
74. What is AOT security?
Role-based security model.
75. Can we extend security?
Yes.
76. What is table permission field?
Allows read, update, delete per table.
77. Can we deny access in security?
Yes using deny permissions.
78. What is field level security?
Restrict specific field access.
79. Can security be assigned via X++?
Yes, using APIs.
80. What is Segregation of Duties?
Ensures no conflicting roles.
SECTION 9 — WORKFLOW (10 Q&A)
81. What is workflow?
Approval process in D365FO.
82. Components?
Workflow type, category, template, approval classes.
83. What is workflow category?
Links workflow to module menu.
84. What is workflow provider?
Assignment mechanism (User, Role, Hierarchy).
85. Can we extend workflow?
Yes, using extensions.
86. What is WorkFlowDocument class?
Handles business logic.
87. What is WorkFlowEventHandler?
Receives workflow events.
88. How to enable role-based assignment?
Provide participant provider in metadata.
89. Can workflow run in batch?
Yes.
90. How to debug workflow?
Attach to batch process & workflow runtime.
SECTION 10 — BATCH JOBS (10 Q&A)
91. What is a batch job?
Asynchronous background processing.
92. Batchable class implements?
SysOperationServiceClass or RunBaseBatch.
93. Difference between SysOperation and RunBaseBatch?
SysOperation is modern and recommended.
94. How to schedule batch jobs?
Through batch dialog.
95. What is retries?
Attempts if batch fails.
96. What is a batch group?
Logical grouping to assign batches to threads.
97. Can we debug batch class?
Yes, attach to batch AOS.
98. How to run batch in parallel?
Use batch tasks.
99. What is batch history?
Logs of finished jobs.
100. How to restrict batch to specific AOS?
Use batch groups.
SECTION 11 — PERFORMANCE OPTIMIZATION (10 Q&A)
101. Why use setbased operations?
Reduces round trips to SQL.
102. Why use while select instead of select inside while?
Performance improvement.
103. Why index is important?
Improves query speed.
104. What is rowversion?
Concurrency control.
105. What slows down forms?
Unnecessary joins & display methods.
106. Why avoid cross-company queries?
Expensive and slow.
107. Why use Querybuild classes?
Dynamic query creation.
108. What is caching?
Stores frequently-used data in memory.
109. Can views improve performance?
Yes, especially aggregate views.
110. Why avoid nested loops?
They degrade performance.
SECTION 12 — DEBUGGING (10 Q&A)
111. How to enable debugging?
Attach to AOS process in VS.
112. What is breakpoint type?
Conditional, function, line breakpoint.
113. How to debug batch?
Attach to batch AOS.
114. How to debug OData?
Debug entity methods through AOS.
115. How to debug form events?
Use event handler and breakpoint.
116. How to debug COC?
Place breakpoint inside extension method.
117. Debugging VS Code vs VS?
Only Visual Studio supports X++ debugging.
118. What is Infolog?
Displays messages/errors.
119. How to debug SQL generated?
Enable 'DataBase Trace'.
120. What is Trace Parser?
Tool to analyze performance.
SECTION 13 — PACKAGES & MODELS (10 Q&A)
121. What is a model?
Logical grouping of elements.
122. What is a package?
Deployment-level container of models.
123. Can we move model to different package?
Yes, through model split/merge.
124. What is overlayering?
Modifying base objects — not allowed anymore.
125. What is extension?
Customizing without modifying source.
126. How to deploy custom model?
Create deployable package.
127. What is hotfix?
Microsoft-provided code fix.
128. Can we delete a model?
Yes, after removing dependencies.
129. Can two models have same element name?
Yes, if in different packages.
130. What is model manifest?
Metadata file describing model.
SECTION 14 — ODATA / API (10 Q&A)
131. What is OData?
REST protocol for accessing data entities.
132. What authentication used?
Azure AD OAuth.
133. How to test OData?
Use Postman.
134. Max batch size?
1000 records per request.
135. Can we call custom service via OData?
Yes.
136. Filters supported?
$filter, $select, $top, $orderby.
137. Can we do joins in OData?
Limited support.
138. Can we push data into D365FO using OData?
Yes, using POST/PATCH.
139. What is AIF?
Legacy integration framework replaced by OData/DMF.
140. Does OData support attachment uploading?
Yes via Document management entity.
SECTION 15 — FILE HANDLING (10 Q&A)
141. How to upload file in cloud?
Using FileUploadTemporaryStorageResult API.
142. How to read CSV without path?
Read from uploaded stream.
143. Can AOS read C:\ drive?
Only in DevBox, not cloud.
144. How to write file to user system?
Use File::SendFileToUser().
145. Supported file types?
XML, CSV, JSON, TXT, Excel.
146. Can we generate Excel?
Yes using OfficeOpenXML.
147. Can we read Excel?
No native support; must use CSV or OData.
148. How to read XML?
XmlDocument class.
149. How to write XML?
XmlWriter or XmlDocument.
150. Can we access network path UNC?
No, not in cloud.
SECTION 16 — JSON (10 Q&A)
151. How to parse JSON in X++?
Using System.Text.Json.
152. How to create JSON?
Using System.Text.Json.JsonObject.
153. Can D365FO call REST API?
Yes via System.Net.HttpClient.
154. How to send JSON request?
Set content = StringContent + application/json.
155. How to read JSON array?
Use JsonArray.
156. Does SysOperation support JSON parameter?
Yes, via strings.
157. JSON vs XML speed?
JSON is faster.
158. Can JSON store attachments?
Yes, base64 encoding.
159. How to deserialize JSON to X++ class?
Manually parse fields.
160. Can X++ serialize class to JSON automatically?
No; must manually map.
SECTION 17 — EVENT HANDLERS (10 Q&A)
161. What types of event handlers exist?
Method, class, form, table events.
162. What is post-event?
Executes after method completes.
163. What is pre-event?
Executes before base logic.
164. Can event handlers cancel execution?
PreHandlers can override parameters.
165. Why avoid too many handlers?
Causes performance issues.
166. Can we debug event handlers?
Yes.
167. Can we call next in handlers?
No.
168. Where to write event handlers?
In a separate class with attribute.
169. Can we disable standard handler?
No.
170. Can event handlers access private methods?
No.
SECTION 18 — QUERY FRAMEWORK (10 Q&A)
171. What is QueryBuildDataSource?
Used to build query in code.
172. What is addRange?
Adds filter to query.
173. What is value()?
Gets SQL text for range.
174. Can we join tables in Query framework?
Yes, using addDataSource.
175. What is QueryRun?
Executes the query in code.
176. How to generate form query?
Override executeQuery.
177. Can we use computed columns?
Yes, using views.
178. What is QueryBasedDataEntity?
Entity based on a query object.
179. Why use NoYesId instead of boolean?
For UI consistency.
180. Can you run Query directly in SSRS?
Yes via Query-based dataset.
SECTION 19 — MICROSOFT AZURE & D365 ARCHITECTURE (10 Q&A)
181. What is AOS?
Application Object Server.
182. What is SQL tier?
Database layer.
183. What is Retail server?
Used for POS integration.
184. Can we access SQL directly?
No access in cloud.
185. What is LCS?
Lifecycle Services portal.
186. What is deployable package?
A compiled artifact for deployment.
187. What is sandbox?
Non-production environment.
188. What is production environment?
Live environment used by end users.
189. How are updates deployed?
Through deployable packages.
190. What is "One version" policy?
Microsoft enforces monthly updates.
SECTION 20 — MISC ADVANCED (10 Q&A)
191. What is DocuRef?
Table storing document attachments.
192. What is Power Automate integration?
Workflow automation using connectors.
193. What is NumberSequence framework?
Generates unique numbers.
194. What is EDT?
Extended data type; wrapper for primitive type.
195. What is ChangeBasedAlert?
Alerts triggered by data changes.
196. What is FormAdapter?
Used in multi-company forms.
197. Can we write SQL stored procedures in D365FO?
No.
198. Does D365 support multithreading?
Batch framework supports parallelism.
199. What is display method caching?
Caching of display method outputs.
200. Can we use Azure Service Bus?
Yes, using DMF or custom service.
Comments
Post a Comment