Dynamics 365 Finance Developer Extension Class

Create Extension Class

Question

You are a Dynamics 365 Finance developer.

You need to create an extension class.

Which action should you perform?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

Extension classes are final classes that are adorned with the ExtensionOf attribute and that also have a name that has the _Extension suffix.

Because the classes are instantiated by the runtime system, it's not meaningful to derive from the extension class.

Therefore, the extension class must be marked as final.

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/extensibility/method-wrapping-coc

In Dynamics 365 Finance and Operations, extensions provide a way to customize the application without modifying the base code. You can create extension classes to add new functionality or modify existing behavior.

To answer the question, the correct action to perform when creating an extension class is to mark the class as public.

Option A, marking the class as final, is not appropriate for extension classes because it prevents other classes from inheriting from the extension class.

Option B, adding the class buffer as the first parameter, is not necessary for extension classes. The buffer parameter is used in base application code to pass data between methods and is not relevant to extension classes.

Option C, marking the class as protected, is not appropriate for extension classes because it restricts access to the class to only subclasses and the same package.

Option D, marking the class as public, is the correct action to perform when creating an extension class because it allows the class to be accessible from any other class, including base application code.

In summary, the correct action to perform when creating an extension class is to mark the class as public, making it accessible from any other class.