All Microsoft exams
Free MB-820 practice test: 30 questions with answers
30 original questions for Microsoft Dynamics 365 Business Central Developer, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 100 questions
All 30 MB-820 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Develop AL extensions (6 questions)
Question 1
A developer needs to add a new field to the Customer table in Business Central without changing the base application's code. Which AL object should be used?
- AA new codeunit with a copy of the table
- BA page with no table link
- CA report that stores the field
- DA table extension object
Show answer and explanationHide answer
Correct answer: DTable extensions add fields to existing tables without modifying the base app, which keeps upgrades safe. A copied codeunit, a report, or an unlinked page does not extend the table itself.
Question 2
A developer wants to add a field to the Customer Card page. Which AL object extends an existing page?
- AA page extension object
- BA report extension used for pages
- CA query object
- DA xmlport object
Show answer and explanationHide answer
Correct answer: APage extensions add fields and actions to existing pages. Query, XMLport, and report extension objects do not extend pages.
Question 3
An extension must run custom logic when a sales order is posted, without changing the posting codeunit. Which mechanism does this?
- AModifying the base posting codeunit directly with a local patch
- BAn event subscriber in a codeunit subscribing to a published event
- CA job queue entry that runs a scheduled task to post the orders
- DA report's OnPreReport trigger that posts the sales order
Show answer and explanationHide answer
Correct answer: BEvent subscribers attach logic to published events in the base app without modifying it. Editing the base codeunit breaks upgrades, scheduled tasks and report triggers do not hook into posting.
Question 4
Which AL keyword marks a procedure as publishing an integration event that other extensions can subscribe to?
- A[IntegrationEvent]
- B[Test]
- C[ServiceEnabled] only
- D[EventSubscriber] only
Show answer and explanationHide answer
Correct answer: AThe IntegrationEvent attribute publishes an event for other extensions to subscribe to. Test marks test procedures, ServiceEnabled exposes procedures to web services, and EventSubscriber subscribes rather than publishes.
Question 5
A developer wants a value in a table to be accepted only if it is greater than zero. Which AL feature enforces this on insert and modify?
- AA field-level validation in the table trigger, such as OnValidate
- BA Caption property assigned to the report and its request page layout
- CA background colour setting applied to the page's control add-in layout
- DA developer comment added to the field description property
Show answer and explanationHide answer
Correct answer: AOnValidate triggers check values when they are entered, which enforces the rule. Comments, colours, and captions do not validate data.
Question 6
Which AL object type holds reusable business logic such as posting routines and calculations?
- AQuery only
- BReport only
- CPage
- DCodeunit
Show answer and explanationHide answer
Correct answer: DCodeunits contain procedures and business logic that other objects call. Pages and reports present or output data, and queries retrieve data.
Data and integration (6 questions)
Question 7
A developer needs an external system to create sales orders in Business Central through a REST call. Which API approach is recommended?
- AEmail the sales orders as attached CSV spreadsheets
- BUse the standard API v2.0 endpoints exposed by API pages
- CConnect directly to the SQL Server database tables
- DUse a screen-scraping script against the web client
Show answer and explanationHide answer
Correct answer: BThe standard APIs are the supported integration surface and remain stable across updates. Direct SQL access, emailed spreadsheets, and screen scraping are unsupported and fragile.
Question 8
A custom integration must process a large set of records in the background without blocking users. Which Business Central feature is designed for this?
- AA message box shown to each user
- BPrinting the records
- CJob queue entries
- DChanging the table indexes
Show answer and explanationHide answer
Correct answer: CJob queue entries run codeunits or reports in the background on schedules, which keeps the UI responsive. Message boxes block users, index changes are unrelated, and printing does not run background processing.
Question 9
Which two statements about Business Central APIs are correct? (Choose two.)
- AAPI v2.0 is the recommended surface for new integrations
- BCustom API pages can expose additional entities for external consumers
- CAPIs bypass all permission checks by default
- DAPIs are only available in the on-premises version
- EAPIs require a separate database for every entity
Show answer and explanationHide answer
Correct answer: A, BAPI v2.0 is recommended for new integrations and custom API pages can extend the exposed entities. APIs respect permissions, are available in the online service, and do not require a separate database per entity.
Question 10
A developer must read Business Central sales orders from an external system in near real time. Which technique is most suitable?
- AExport the sales orders by hand every morning from the list page into a spreadsheet
- BCapture the Business Central sales orders screen as an image and read the figures from it with an OCR engine
- CUse webhooks or change notifications from the supported API where available, with a polling fallback
- DRun a script that scans the Sales Header and Sales Line tables every second for changes
Show answer and explanationHide answer
Correct answer: CSupported change notifications or webhooks deliver updates promptly, with polling as a fallback. Database scanning, manual exports, and OCR are unsupported, slow, or error-prone.
Question 11
A customer's system sends orders in a CSV file each night, which must be imported into Business Central. Which AL object handles file import with a defined structure?
- AXMLport
- BPage extension
- CQuery object only
- DPermission set
Show answer and explanationHide answer
Correct answer: AXMLports read and write XML and text files with defined structures, which suits imports. Page extensions change UI, permission sets control access, and queries retrieve data.
Question 12
An integration must authenticate against Business Central's API using a service identity rather than a personal user. Which approach is recommended?
- AShare a named user's password in the integration code and store it in the AL app settings table for reuse
- BExpose the web service as an anonymous endpoint with no authentication so that the integration can call it freely
- CSign in with the administrator's personal Microsoft 365 login for API calls
- DUse an app registration with OAuth and assign the required permissions to the service identity
Show answer and explanationHide answer
Correct answer: DOAuth app registrations with service identities and scoped permissions are the supported secure approach. Shared passwords, anonymous endpoints, and personal admin logins are insecure.
Deployment and lifecycle (6 questions)
Question 13
An extension is ready to be deployed to a customer's production environment. Which step should come before deployment?
- ADelete the existing company data tables and their records first before reinstalling the extension
- BTest the extension in a sandbox that mirrors production and validate the upgrade path
- CInstall it directly into the production tenant without testing or a rollback plan
- DRemove the version number from the app manifest before publishing the build to the production tenant
Show answer and explanationHide answer
Correct answer: BTesting in a production-like sandbox and validating the upgrade path finds issues before they reach customers. Direct installs, deleting data, and removing version numbers increase risk.
Question 14
An extension increments its version number for each release. Why is this important?
- AIt allows the platform to identify and upgrade the installed extension correctly
- BIt automatically disables previous versions when a new build is installed
- CIt changes the colour of the extension icon shown in the app list
- DIt removes the need for regression testing in the test environment
Show answer and explanationHide answer
Correct answer: AVersion numbers let the platform manage installation and upgrades correctly. Icons, testing, and disabled versions are not governed by the version number.
Question 15
A team wants to automate building and publishing an extension whenever code changes are merged. Which approach fits best?
- AA CI/CD pipeline that builds the app, runs tests, and publishes to a sandbox
- BPublishing the compiled app directly to production environment from a shared folder
- CSending the app file by email to an administrator for installation
- DManual compilation on a developer's laptop each time, then the output copied to a file share
Show answer and explanationHide answer
Correct answer: AA CI/CD pipeline builds and tests automatically and publishes to a sandbox first, which gives repeatable and safer releases. Laptop builds, direct production publishing, and email installs are error-prone or unsafe.
Question 16
A customer's production environment must receive an extension update during a planned window with a backup taken beforehand. Which practice does this?
- ADelete the production environment and recreate it from a fresh copy of the sandbox
- BUpdate whenever a new build is ready, without taking a backup or verifying it
- CSchedule the update in a maintenance window after a verified backup
- DUpdate during peak business hours without notifying the customer or the support team
Show answer and explanationHide answer
Correct answer: CA planned window with a verified backup reduces risk and disruption. Unplanned updates without backups, recreating environments, and peak-hour updates without notice all increase risk.
Question 17
An extension must support a data upgrade when its version changes, such as moving data from an old field to a new one. Which AL mechanism is designed for this?
- AReport footers and headers repeated per page
- BPage captions and tooltips shown on the customer list and card page
- CPermission set names and their role descriptions
- DUpgrade codeunits that run during installation or upgrade
Show answer and explanationHide answer
Correct answer: DUpgrade codeunits run data migration steps when an extension installs or upgrades. Captions, footers, and permission names do not migrate data.
Question 18
Which practice keeps an extension's public interface stable for other extensions that depend on it?
- AKeep published procedures and events backward compatible across versions
- BRemove published events that no longer fit the new design in every release
- CMake every procedure private with no publication attributes
- DRename the procedures and their parameters in each version
Show answer and explanationHide answer
Correct answer: ABackward-compatible published interfaces avoid breaking dependent extensions. Removing or renaming published items breaks dependants, and making everything private prevents deliberate extension.
Testing and quality (6 questions)
Question 19
A developer wants to verify that a new posting extension calculates totals correctly, and to run the test every time the code changes. Which approach is recommended?
- ACheck the posted totals manually once in the production environment
- BCreate test codeunits with the Test attribute and run them with the test toolkit
- CAsk an end user to report calculation errors later through a formal support desk ticket
- DTrust the calculation because the code compiled successfully in the development environment
Show answer and explanationHide answer
Correct answer: BAutomated test codeunits with the Test attribute, run through the test toolkit, catch regressions each time code changes. Manual production checks, compile success, and user reports detect problems too late.
Question 20
A test must not change real customer data in the production tenant. Which environment should the test run in?
- AA customer's live tenant
- BThe production tenant
- CA sandbox environment
- DThe developer's personal printer
Show answer and explanationHide answer
Correct answer: CSandbox environments isolate testing from production data, which protects customers. Production and live customer tenants risk data changes, and printers are unrelated.
Question 21
A test codeunit must create its own test data and clean up afterwards so that tests do not depend on each other. Which practice does this?
- AUse whatever records exist in production for the test runs
- BCreate and remove test records within each test, keeping tests isolated
- CSkip the cleanup step to save time during the nightly build
- DRun tests in random order without setup so each test inherits state
Show answer and explanationHide answer
Correct answer: BIsolated setup and cleanup make tests reliable and independent. Using production data, random order without setup, and skipping cleanup create flaky or unsafe tests.
Question 22
A test verifies that an error message appears when a required field is blank. Which assertion helps verify this behaviour?
- AAn assertion that the test passed because the procedure ran without errors
- BAn assertion that the expected error is raised for the blank value
- CA visual check of the page colour and spacing on the card in the browser by eye
- DA test that does not invoke the procedure under test and reads back the setup record
Show answer and explanationHide answer
Correct answer: BAssertions that the expected error occurs verify the behaviour directly. Passing without checks, visual checks, and tests that never run the code do not verify anything.
Question 23
A team wants confidence that a change does not break an existing business process, including several extensions working together. Which test type best fits this?
- AEnd-to-end or scenario tests across the extensions
- BA compile check of the changed objects in a build
- CA single unit test with no setup data loaded
- DA manual colour review of the pages' layouts
Show answer and explanationHide answer
Correct answer: AScenario tests exercise the process across extensions, which catches integration problems. A colour review, a compile check, and an isolated unit test with no setup do not cover that process.
Question 24
A developer wants to know which code paths a test suite does not exercise. Which measurement is most appropriate?
- AThe number of comment lines in the AL source
- BThe number of AL object files in the workspace
- CCode coverage analysis for the AL objects
- DThe average length of the test procedure names
Show answer and explanationHide answer
Correct answer: CCode coverage shows which lines or paths are exercised, which highlights untested logic. File counts, name lengths, and comment counts do not measure test coverage.
Extensibility (6 questions)
Question 25
A developer wants a new feature to be turned on for some customers only, without a new release. Which Business Central mechanism supports this?
- ARenaming the feature flag each week so customers cannot rely on it
- BDeleting the feature for everyone and its setup record
- CA client screen resolution and display scaling preference in a browser
- DFeature management or a setup switch controlled per tenant
Show answer and explanationHide answer
Correct answer: DFeature flags or setup switches enable functionality per customer without releasing separate code. Deleting features, screen resolution, and renaming do not control availability.
Question 26
An extension must add a new option to a field's list of values without changing the base option list. Which AL feature provides this?
- AReport caption
- BEnum extension
- CPage background
- DTable index
Show answer and explanationHide answer
Correct answer: BEnum extensions add values to existing enums without editing the base app. Indexes, captions, and backgrounds do not extend option lists.
Question 27
A developer wants to add a new action to a sales document's posting menu. Which approach is the supported way?
- APage extension adding an action that calls a codeunit procedure
- BEditing the base page's posting action group in the source
- CCreating a new sales table in the database with its own posting logic
- DAdding a button to the operating system's taskbar that runs
Show answer and explanationHide answer
Correct answer: AA page extension with an action that calls codeunit logic is the supported extension approach. Editing base source, OS buttons, and new database tables are not supported UI extensions.
Question 28
A developer needs to add a new column to a report output without rewriting the base report. Which approach is supported?
- AA report extension that adds columns or data items
- BPrinting the report and typing in a column
- CRemoving the report from the navigation menu
- DEditing the base report's layout file directly
Show answer and explanationHide answer
Correct answer: AReport extensions add columns and data items to existing reports in a supported way. Editing base layouts, manual printing edits, and removing reports do not extend the output properly.
Question 29
A developer must restrict a new field so that only users with a specific permission can see it. Which combination is appropriate?
- AHiding the field with a caption and a tooltip that explains its purpose
- BField-level permission in a permission set assigned to the relevant users
- CTelling users not to look at the field and to report accidental views to the admins
- DStoring the field in a code comment block that developers keep
Show answer and explanationHide answer
Correct answer: BPermission sets with field-level permissions enforce visibility for specific users. Captions, instructions, and comments do not restrict access.
Question 30
An extension needs to run a procedure after a record is inserted in a table, without changing the table's base code. Which mechanism applies?
- AA page caption change
- BA report footer
- CAn OnAfterInsert event subscriber in a codeunit
- DEditing the table's insert trigger in the base app
Show answer and explanationHide answer
Correct answer: CSubscribing to the published OnAfterInsert event runs logic after insertion without modifying the base code. Editing base triggers, captions, and footers do not run logic on insert.