10 questions covering this official MB-820 domain.
Q01 - Question
In an AL procedure you must store a set of values in memory and retrieve each value by a unique identifier that you define, and some of the stored values are themselves lists of text. The number of identifiers is not known when you write the code. Which collection type should you declare?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. An Array, because it is one-indexed and can be resized at runtime.
- B. A List, because you can look up an entry by any key value that you supply.
- C. A Record variable, because it stores rows for a particular table.
- D. A Dictionary, because it retrieves values by unique keys and can hold lists as values.
D is correct.
Explanation: A Dictionary uses unique keys to retrieve values, and its values can be lists or other dictionaries, which matches a lookup by identifier where each value is a list of text.
A is incorrect: An Array is one-indexed but has fixed declared dimensions, so it cannot grow to an unknown number of entries and it is addressed by position, not by a key you define.
B is incorrect: A List is a dynamic collection of fundamental types, so it does not provide retrieval by a unique key.
C is incorrect: A Record variable represents rows for a particular table and is not an in-memory collection keyed by values you define in code.
Q02 - Question
A procedure receives an interface variable. Some implementations also support an additional interface, and others do not. You must call the additional capability without causing a runtime error. What should you do?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Cast the variable with as and let the failed cast end the call when the capability is missing.
- B. Cast the variable with as first, then use is to confirm the cast succeeded.
- C. Replace the interface parameter with one parameter for each concrete codeunit.
- D. Test the variable with is for the additional interface, and cast with as only when the test succeeds.
D is correct.
Explanation: Use is to test whether an interface or Variant supports another interface, then use as to cast to it. Testing first is a defensive pattern because a failed as cast raises a runtime error.
A is incorrect: A failed as cast raises a runtime error instead of returning a result you can evaluate.
B is incorrect: The cast runs before the test, so the runtime error occurs before is can report anything.
C is incorrect: Separate parameters for each concrete object reintroduce dependencies on implementations and defeat the purpose of the interface parameter.
Q03 - Question
A customer wants a customized report to run instead of a standard Dynamics 365 Business Central report whenever users start it from a page action, from Tell Me, or when code invokes the report. Extending the existing report is not sufficient for the requirement. What should you implement?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Set UsageCategory to None on the standard report so that only the customized report is found.
- B. Add AdditionalSearchTerms to the customized report so that users select it instead.
- C. Create a report extension for the standard report and change its dataset caption.
- D. Subscribe to the OnAfterSubstituteReport event in Codeunit 44 ReportManagement and assign NewReportId when the ReportId matches the standard report.
D is correct.
Explanation: Subscribing to ReportManagement.OnAfterSubstituteReport and assigning NewReportId for the target ReportId substitutes the report, and the event is raised for page actions, Tell Me, and report invocation methods.
A is incorrect: Setting UsageCategory to None only removes the standard report from Tell Me results and does not affect page actions or calls from code.
B is incorrect: Additional search terms change how users find an object, not which report runs when the standard report is called.
C is incorrect: A report extension directly extends an existing report and can avoid substitution in some cases, but it does not meet a requirement that extension alone cannot satisfy.
Q04 - Question
Your AL code stores item numbers in a List of Text. A duplicate value exists in the list, and you must delete only the entry at position 3. Which method do you use?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. RemoveAt
- B. Remove
- C. Contains
- D. Reverse
A is correct.
Explanation: RemoveAt deletes the element at the index that you pass, so you can target position 3 without depending on the value.
B is incorrect: Remove deletes the first element that matches the value, which can delete the wrong entry when duplicates exist.
C is incorrect: Contains only reports whether the list holds a value and does not delete anything.
D is incorrect: Reverse changes the order of the elements and does not delete an element.
Q05 - Question
You write AL code that packs a total quantity of Integer units into boxes of a fixed size. You must calculate the number of full boxes and the number of units left over, and both results must be integers. Which operators should you use?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Use / for the number of full boxes and MOD for the units left over.
- B. Use DIV for the number of full boxes and MOD for the units left over.
- C. Use MOD for the number of full boxes and DIV for the units left over.
- D. Use the conditional ? : operator for both results.
B is correct.
Explanation: DIV returns the integer quotient of a division, which gives the number of full boxes, and MOD returns the remainder, which gives the units left over.
A is incorrect: The / operator performs a standard division and does not return the integer quotient that DIV provides.
C is incorrect: The roles are reversed, because MOD returns the remainder and DIV returns the integer quotient.
D is incorrect: The conditional ? : operator selects one of two values based on a condition, so it does not perform the arithmetic needed here.
Q06 - Question
A notification must let the user start a correction routine directly from the notification bar. Where must the method that runs from the notification action be placed, and which function connects it?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Place the method on the page object and connect it with SetData.
- B. Place the method in a codeunit and connect it with AddAction.
- C. Place the method on the table extension and connect it with Send.
- D. Place the method in a report and connect it with GetData.
B is correct.
Explanation: AddAction adds an action to the notification, and the action runs a method in a codeunit.
A is incorrect: SetData stores text data on the notification; it does not create an action, and the action method is not taken from the page object.
C is incorrect: Send displays the notification and does not attach the method that runs when the user selects an action.
D is incorrect: GetData reads the stored text values inside the handler; it does not define where the action runs.
Q07 - Question
A customer requires that a calculated charge is always rounded upward to two decimals, even when the third decimal is low. Which Round call meets the requirement?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Round(Amount, 0.01)
- B. Round(Amount, 0.01, '<')
- C. Round(Amount, 0.01, '=')
- D. Round(Amount, 0.01, '>')
D is correct.
Explanation: The direction parameter '>' rounds the value upward, and the precision parameter 0.01 sets rounding to two decimals.
A is incorrect: When you omit the direction, Round uses nearest rounding, so low third decimals round downward.
B is incorrect: The '<' direction rounds the value downward, which is the opposite of the requirement.
C is incorrect: The '=' direction rounds to the nearest value, so the result is not always rounded upward.
Q08 - Question
A developer must warn users about a missing setup value when a page opens. The warning must not stop the user from continuing to work on the page. Which interaction meets this requirement?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Call the Error function so the user must correct the setup first.
- B. Call the Message function to display the warning in a dialog.
- C. Send a notification so the warning appears without blocking the user.
- D. Call the Confirm function and continue based on the user response.
C is correct.
Explanation: Notifications are small, non-modal alternatives to blocking interactions, so the user sees the warning and can keep working on the page.
A is incorrect: Error stops execution and forces the user to resolve the condition before continuing, which blocks the work you want to allow.
B is incorrect: Message shows a modal dialog that the user must close before continuing.
D is incorrect: Confirm is a blocking interaction that waits for a user response before code continues.
Q09 - Question
In AL, you hold a JsonToken that contains a JSON object with a property named city. You must read the text stored in that property. Which sequence of members do you use?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Use AsObject on the token, use Get to retrieve the city property, then use AsValue to read the stored value.
- B. Use AsArray on the token, then use Add to append the city property, then read the array.
- C. Use ReadFrom on the token to load the city property, then use AsArray to read the value.
- D. Use Add on the token to register the city property, then use AsObject to read the value.
A is correct.
Explanation: Convert the token to a JsonObject with AsObject, retrieve the named property with Get, and then convert the returned token to a JsonValue with AsValue so you can read the stored data.
B is incorrect: AsArray targets JSON arrays rather than named properties, and Add writes data into a JSON structure instead of reading it.
C is incorrect: ReadFrom parses JSON text into a JSON type, so it is used when you load a response, not when you read a property from a token you already have.
D is incorrect: Add inserts a property into a JSON structure, so it changes the data rather than returning the existing value.
Q10 - Question
You plan to publish an extension that substitutes a standard report in a production environment where other extensions are already installed. Which action helps you avoid conflicting or failing behavior after deployment?
Domain: Develop by using AL (15-20%) Type: Single choice
- A. Check whether another subscriber has already substituted the report, and verify that the replacement report is compatible with the code that calls it.
- B. Set UsageCategory to None on the standard report so that only the replacement is returned by Tell Me.
- C. Give the replacement report a clearly different caption so that users can distinguish it from the standard report.
- D. Remove the standard report from the environment before you publish the substitution.
A is correct.
Explanation: Another subscriber can already assign a NewReportId for the same report, so check for an existing substitution, and confirm that the replacement report works for the code that invokes it.
B is incorrect: Changing UsageCategory affects only Tell Me results and does not control which report runs from page actions or from code.
C is incorrect: Matching captions are preferred where appropriate so that linked actions and bookmarks stay consistent.
D is incorrect: Substitution works by redirecting the call at run time through the OnAfterSubstituteReport event, so the base report remains in the environment.