Question
You are a Dynamics 365 Finance developer.
You need to create an extension class.
Which action should you perform?
- A. Mark the class as final. Correct
- B. Add the class buffer as the first parameter.
- C. Mark the class as protected.
- D. Mark the class as public.
Explanation
An X++ extension class must be declared final, decorated with the ExtensionOf attribute and named with the _Extension suffix. Passing the augmented object as the first parameter is how the older static extension-method approach worked, and it is not needed for an extension class. Access modifiers such as public or protected are not what makes a class a valid extension.