nerdexam
Microsoft

MB-500 · Question #26

You are a Dynamics 365 Finance developer. You create a class. You need to mark the class to ensure that when code is compiled, the process fails if a specific method is called in the source code…

The correct answer is D. SysObsoleteAttribute. One use of the SysObsoleteAttribute class is to notify the compiler that the compile should fail if a particular method is called in the source code. The compiler rejects the compile, and displays the specific message that is stored in this use of the attribute…

Design and develop AOT elements

Question

You are a Dynamics 365 Finance developer. You create a class. You need to mark the class to ensure that when code is compiled, the process fails if a specific method is called in the source code. Which attribute should you use?

Options

  • ASysEntryPointAttribute
  • BgetAttributes
  • CSysAttribute
  • DSysObsoleteAttribute

How the community answered

(38 responses)
  • A
    5% (2)
  • B
    5% (2)
  • C
    18% (7)
  • D
    71% (27)

Explanation

One use of the SysObsoleteAttribute class is to notify the compiler that the compile should fail if a particular method is called in the source code. The compiler rejects the compile, and displays the specific message that is stored in this use of the attribute. https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-attribute-classes

Topics

#SysObsoleteAttribute#X++ class attributes#compilation failure#method deprecation

Community Discussion

No community discussion yet for this question.

Full MB-500 Practice