MB-820 practice question 25 of 25

You need to define the data types for the fields of the N on-conformity table. Which two data types should you use? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

Full set: 116 questions

Domain Configure Microsoft Dynamics 365 Business Central

Answer options
A: Integer for the N on-conformity Number field
B: Date Time for the Non-Conformity Date field
C: Char for the Non-Conformity Number field
D: Date for the Non-Conformity Date field Correct answer
E: Code for the Non-Conformity Number field Correct answer
Correct Answer:
D. Date for the Non-Conformity Date field; E. Code for the Non-Conformity Number field
Explanation

In Dynamics 365 Business Central development using the AL language, specific data types are used for different purposes to ensure data integrity and system performance. The Code data type is the standard for fields that serve as unique identifiers or primary keys, such as a "Non-conformity Number". It is optimized for this role, supporting alphanumeric values and integration with number series. For a field intended to store only a date without a time component, the Date data type is the most appropriate and efficient choice, directly matching the requirement for a "Non-Conformity Date".

Why Incorrect

A. Integer for the Non-conformity Number field: An Integer is a numerical type. The Code data type is preferred for identifiers as it supports alphanumeric characters and number series formatting (e.g., NC-0001).
B. Date Time for the Non-Conformity Date field: DateTime stores both a date and a time. Since the requirement is only for a date, using the Date data type is more precise and efficient.
C. Char for the Non-Conformity Number field: The Char data type in AL is for a single character. For an identifier string, the Code data type is the correct choice, as it's designed for variable-length alphanumeric codes.

References

1. Microsoft Learn: Code Data Type. "The Code data type denotes a string of alphanumeric characters. It is typically used for codes and for fields that are used as primary keys in tables."

2. Microsoft Learn: Date Data Type. "Use this data type for columns that contain dates (with no time-of-day part)."

3. Microsoft Learn: AL Data Types. This document provides an overview of all simple data types, clearly distinguishing the use cases for Code, Integer, Date, and DateTime, reinforcing the choices above as standard practice in Business Central development.

Scroll to Top