Microsoft MB-820 Practice Test Questions and Exam Dumps Part16 Q301-320

View Full Microsoft MB-820 Exam Dumps and Practice Test Dumps.

 

Question 301

Which AL object is commonly used to define the columns and data source for a report?

  1. PageExtension
  2. Report
  3. Interface
  4. PermissionSet

Correct Answer: 2

Explanation

A Report object defines the data and processing structure used to generate reports in Business Central. Its dataset specifies the records and fields that are made available to the report layout. Reports can be used to present business information in formats suitable for printing, viewing, or exporting. PageExtension is used to customize existing pages, Interface defines a contract between implementations, and PermissionSet manages access rights. When developing reports, it is important to design the dataset carefully so that only the required information is retrieved and unnecessary database processing is avoided.

Question 302

What is the primary purpose of a report request page in AL?

  1. To allow users to enter report options and filters before execution
  2. To define database relationships
  3. To store application secrets
  4. To create an API endpoint

Correct Answer: 1

Explanation

A report request page allows users to provide options, filters, and other parameters before a report is executed. This gives users control over the data included in the generated report without requiring changes to the report’s source code. Request pages can expose relevant filtering and option fields that influence report processing. Database relationships are handled through table relations, while API endpoints are typically provided through API pages or related web service mechanisms. Sensitive credentials should never be collected or stored through a report request page simply because it provides user input functionality.

Question 303

Which AL object can be used to extend supported functionality of an existing report?

  1. TableExtension
  2. ReportExtension
  3. Page
  4. Enum

Correct Answer: 2

Explanation

ReportExtension allows developers to extend supported aspects of an existing report without directly modifying the original report object. This follows the extension-based development model and helps keep customizations separate from base application code. Depending on the supported extension points, developers can add or modify report-related elements such as dataset content or request-page functionality. TableExtension is used for extending tables, Page is a user-interface object, and Enum represents predefined values. Developers should verify the supported extension points before designing a report customization to ensure the required change can be implemented through the extension framework.

Question 304

Which AL feature is most appropriate for representing a predefined set of related values such as document status?

  1. Enum
  2. Blob
  3. Dictionary
  4. InStream

Correct Answer: 1

Explanation

An Enum represents a predefined set of related values. For example, an application might use an Enum to represent statuses such as Open, Released, or Completed. Enums provide clearer and more structured code than using arbitrary text or numeric values for fixed choices. Blob is intended for larger data storage, Dictionary stores key-value pairs, and InStream is used to read stream data. Enums can also be extended through EnumExtension when additional values are required by an extension. Developers should choose meaningful enum values and consider how each value will be handled throughout the application.

Question 305

Which feature allows an extension to add additional values to an existing Enum?

  1. ReportExtension
  2. TableRelation
  3. EnumExtension
  4. FieldGroup

Correct Answer: 3

Explanation

EnumExtension provides a way for an extension to add supported values to an existing Enum. This allows developers to expand standard functionality without modifying the original Enum definition. For example, an extension may need an additional business status that was not included in the base application. ReportExtension is used for report customizations, TableRelation defines relationships between fields, and FieldGroup organizes selected table fields. When adding Enum values, developers should ensure that existing application logic handles the new values correctly, particularly in CASE statements, validations, reports, and integrations.

Question 306

What is the main advantage of using a Dictionary in AL?

  1. It stores key-value pairs for efficient lookup
  2. It creates a database table automatically
  3. It defines page permissions
  4. It publishes a web service

Correct Answer: 1

Explanation

A Dictionary stores information as key-value pairs, allowing code to associate a value with a specific key and retrieve that value efficiently. This is useful when an application needs temporary lookup information during processing. Dictionaries can contain different supported data types depending on how they are declared. They do not automatically create database tables, define permissions, or publish web services. Developers should select an appropriate key type and value type based on the processing requirement. Dictionaries can be particularly helpful when repeatedly looking up information without performing the same database operation multiple times.

Question 307

Which AL data type is designed to represent an ordered collection of values?

  1. Label
  2. List
  3. RecordRef
  4. FieldRef

Correct Answer: 2

Explanation

The List data type represents a collection of values that can be accessed in an ordered sequence. It is useful when developers need to maintain multiple values temporarily during application processing. Unlike database tables, Lists exist in application memory and are not intended to provide persistent database storage. Label is used for translatable text, RecordRef provides dynamic record references, and FieldRef provides dynamic field references. Lists can be useful for collecting identifiers, processing items sequentially, or temporarily storing values before performing another operation. Developers should still consider memory usage when working with very large collections.

Question 308

Which AL type is commonly used to work with a collection of JSON values in an ordered structure?

  1. JsonArray
  2. JsonObject
  3. Boolean
  4. Blob

Correct Answer: 1

Explanation

JsonArray represents an ordered collection of JSON values. A JSON array can contain multiple elements, including objects, strings, numbers, Boolean values, or other supported JSON structures. It is commonly used when interacting with external APIs that return lists of records or objects. JsonObject represents a JSON object containing named properties, while Boolean and Blob serve unrelated purposes. When processing external JSON, developers should validate that the expected array or properties exist before accessing them because external services may return incomplete or unexpected data.

Question 309

Which AL type represents an individual JSON value that can be inspected or converted into a more specific JSON type?

  1. JsonToken
  2. Decimal
  3. InStream
  4. Enum

Correct Answer: 1

Explanation

JsonToken provides a general representation of a JSON value and can be used when processing JSON structures dynamically. A token can represent different JSON value types, such as an object, array, string, number, or Boolean value. Developers can inspect the token and work with the appropriate JSON type when processing a response from an external service. Decimal handles numeric application values, InStream reads stream data, and Enum represents predefined values. JsonToken is particularly useful when the exact structure of incoming JSON must be examined dynamically before further processing.

Question 310

Which AL method is commonly used to retrieve the number of records that match the current filters?

  1. Modify
  2. Count
  3. Insert
  4. Validate

Correct Answer: 2

Explanation

The Count method returns the number of records that match the current filtering conditions on a record variable. It can be useful when application logic needs to determine how many records meet certain criteria before continuing with processing. Modify saves changes to an existing record, Insert creates a new record, and Validate applies field validation logic. Developers should remember that Count operates within the current filtering context. Applying appropriate filters before calling Count can help ensure that the returned number represents exactly the intended dataset.

Question 311

What is the purpose of the SetFilter method in AL?

  1. To define a filter expression for a record field
  2. To delete a record
  3. To publish an extension
  4. To create a page action

Correct Answer: 1

Explanation

SetFilter applies a filter expression to a field on a record variable. It is more flexible than SetRange because it can support filter expressions and patterns appropriate for the field type. Developers can use SetFilter to restrict the records returned by subsequent database operations. Delete removes records, publishing an extension is a deployment operation, and page actions are user-interface functionality. Correct filtering is important for both functional accuracy and performance because it prevents application logic from processing records that do not meet the required criteria.

Question 312

Which statement best describes the difference between SetRange and SetFilter?

  1. SetRange is only used for pages
  2. SetFilter cannot be used with records
  3. SetRange is suited to simple ranges, while SetFilter supports filter expressions
  4. SetRange deletes records while SetFilter modifies them

Correct Answer: 3

Explanation

SetRange is generally used for straightforward filtering conditions such as an exact value or a defined range. SetFilter provides more flexible filtering by allowing filter expressions and patterns supported by Business Central. Both methods can be used on record variables to control which records are included in subsequent operations. Neither method directly modifies or deletes records. Choosing between them depends on the filtering requirement. For simple equality or ranges, SetRange often makes the intent clear, while SetFilter is useful when more complex filtering syntax is required.

Question 313

Which AL trigger is associated with inserting a new record into a table?

  1. OnDelete
  2. OnInsert
  3. OnModify
  4. OnOpenPage

Correct Answer: 2

Explanation

The OnInsert trigger executes when a new record is inserted into a table. It can be used to implement business logic that should occur during record creation, such as setting values or performing additional validation. OnDelete is associated with deleting records, while OnModify is associated with modifying existing records. OnOpenPage belongs to page processing rather than table insertion. Developers should avoid putting excessive unrelated logic into table triggers because this can make database operations harder to understand and may create unexpected behavior when records are inserted from different parts of the application.

Question 314

Which trigger is associated with changes made to an existing record?

  1. OnModify
  2. OnInsert
  3. OnDelete
  4. OnInitPage

Correct Answer: 1

Explanation

The OnModify trigger is associated with modifications to existing records. It can be used when business logic needs to execute as a record is changed. OnInsert applies to new records, OnDelete applies when records are removed, and OnInitPage relates to page initialization. Developers should carefully consider whether logic belongs in a table trigger or elsewhere because table triggers can affect many different processes that modify records. Keeping trigger logic focused helps maintain predictable behavior and reduces the possibility of unexpected side effects during imports, integrations, background processing, or user-driven changes.

Question 315

What is the main purpose of the OnDelete trigger in a table?

  1. To run logic when a record is deleted
  2. To create a new field
  3. To display a FactBox
  4. To define an API endpoint

Correct Answer: 1

Explanation

The OnDelete trigger is used to execute table-level logic when a record is deleted. Developers can use it to perform supported business processing that needs to occur during deletion. This might include validating whether deletion is permitted or handling related application information. It is important to design deletion logic carefully because deleting data can have significant consequences. FactBoxes are page components, fields are defined through table structures or extensions, and API endpoints serve integration purposes. Developers should also consider relationships and referential behavior when implementing custom deletion rules.

Question 316

Which AL feature can help ensure that only authorized users can perform specific application operations?

  1. PermissionSet
  2. JsonArray
  3. Query
  4. Label

Correct Answer: 1

Explanation

PermissionSet objects define permissions that control access to Business Central application objects and data. By assigning appropriate permission sets to users or groups, administrators can control what operations users are authorized to perform. JsonArray is used for JSON collections, Query retrieves structured data, and Label provides translatable text. Permission design should follow the principle of least privilege, meaning users should receive only the access required for their responsibilities. Developers should also consider how custom extension objects fit into the application’s overall permission model.

Question 317

What is the purpose of a security filter on a record permission?

  1. To restrict which records a user can access within an object
  2. To change the page caption
  3. To create an HTTP request
  4. To modify an Enum

Correct Answer: 1

Explanation

A security filter can restrict access to specific records within an object rather than granting unrestricted access to all records covered by the permission. This can be useful when users should have permission to work with a table but only within a defined subset of its records. Security filters are therefore an important part of fine-grained access control. Page captions, HTTP requests, and Enum modifications are handled through different AL features. Security design should be tested carefully because record-level restrictions can affect application behavior in ways that may not be immediately visible to developers.

Question 318

Which file commonly contains extension metadata such as the application version and dependencies?

  1. launch.json
  2. app.json
  3. settings.json
  4. package.json

Correct Answer: 2

Explanation

The app.json file contains important metadata for a Business Central AL extension. It can define information such as the extension name, publisher, version, runtime, application compatibility, and dependencies on other applications. The launch.json file is primarily associated with debugging and launch configurations. Correct dependency and version information is important because Business Central uses extension metadata when validating and managing applications. Developers should update app.json carefully when releasing new versions or introducing dependencies because incorrect metadata can prevent an extension from compiling, publishing, or upgrading correctly.

Question 319

What is the primary purpose of launch.json in an AL development project?

  1. To define debugging and launch configuration settings
  2. To define database tables
  3. To store customer passwords
  4. To define report datasets

Correct Answer: 1

Explanation

The launch.json file is used to configure how the AL project connects to and interacts with a Business Central development environment when debugging or launching the application. It can contain settings related to the target environment and debugging behavior. It is separate from app.json, which contains extension metadata and dependencies. Developers should avoid storing sensitive credentials unnecessarily in configuration files, especially when those files are tracked in source control. Proper launch configuration makes it easier to work with sandbox environments, debug extension code, and reproduce development setups across team members.

Question 320

Why is schema synchronization important when changing the database structure of an AL extension?

  1. It aligns the database schema with the updated extension definition
  2. It translates all application labels
  3. It automatically creates user accounts
  4. It replaces all permission sets

Correct Answer: 1

Explanation

Schema synchronization ensures that the database structure is brought into alignment with changes introduced by an extension. When developers add, modify, or otherwise change supported table structures, the application and database schema must remain consistent. Business Central manages schema synchronization as part of extension deployment and upgrade processes, subject to the type of change being made. Developers must pay particular attention to destructive or breaking schema changes because existing data may be affected. Careful upgrade planning, testing, and appropriate upgrade logic help reduce the risk of data loss or failed deployments.