Q:
A company uses Dynamics 365 Finance.
You need to cache values for a specific record.
Which collection class should you use?
Select only one answer.
-
A
List
-
B
Map
-
C
Set
-
D
Struct
B
Answer:
B
Explanation:
The correct answer is:
✅ Map
✅ Explanation:
When you need to cache values for a specific record in Dynamics 365 Finance (X++), the most appropriate collection class is:
✔️ Map
Why Map?
-
Map is a key-value pair collection.
-
You can store a record ID (or any unique identifier) as the key, and the associated data (like a cached value or object) as the value.
-
It allows for efficient retrieval based on the key, making it perfect for caching scenarios.
❌ Why the other options are incorrect:
-
List
❌ Ordered collection without key-based lookup. You'd have to iterate to find a record — not efficient for caching.
-
Set
❌ Holds unique values but doesn't store key-value pairs, so you can't map values to a specific record.
-
Struct
❌ Used to group related fields together (like a lightweight object), but not suitable for storing multiple records or caching by key.
✅ Final Answer:
✔ Map
Related Topic:
Share Above MCQ