Free MB-500 Exam Braindumps (page: 34)

Page 34 of 66
View Related Case Study

You are a Dynamics 365 Finance and Operations 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?

  1. SysEntryPointAttribute
  2. getAttributes
  3. SysAttribute
  4. SysObsoleteAttribute

Answer(s): D

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.


Reference:

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-attribute-classes



View Related Case Study

You are a Dynamics 365 Finance developer.

You have a table named FMVehicle that contains a field named VehicleId. The table has an index named VehicleIdIdx on the VehicleId field. You declare a table buffer named vehicle to refer to the table.

You need to select all records from the FMVehicle table in ascending order based on VehicleId field in the vehicle variable.

Which embedded-SQL statement should you use?

  1. select vehicle index VehicleId;
  2. select vehicle index VehicleIdIdx;
  3. select VehicleId from vehicle order by VehicleIdIdx asc;
  4. select vehicle order by VehicleId desc;

Answer(s): B

Explanation:

The ‘index VehicleIdIdx’ statement will cause an Order By Asc of the fields contained in the index. In this case, that means an Order By Asc of the VehicleID field.



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You have a Dynamics 365 Finance environment.
You have the following code: (Line numbers are included for reference only.)

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: Yes
Class extension - Method wrapping and Chain of Command.
The functionality for class extension, or class augmentation, has been improved. You can now wrap logic around methods that are defined in the base class that you're augmenting. You can extend the logic of public and protected methods without having to use event handlers. When you wrap a method, you can also access public and protected methods, and variables of the base class. In this way, you can start transactions and easily manage state variables that are associated with your class.

Box 2: Yes
In the following example, the wrapper around doSomething and the required use of the next keyword create a Chain of Command (CoC) for the method. CoC is a design pattern where a request is handled by a series of receivers. The pattern supports loose coupling of the sender and the receivers [ExtensionOf(classStr(BusinessLogic1))]
final class BusinessLogic1_Extension
{
str doSomething(int arg)
{
// Part 1
var s = next doSomething(arg + 4);
// Part 2 return s;
}
}

Box 3: Yes
Instance and static methods can be wrapped by extension classes. If a static method is the target that will be wrapped, the method in the extension must be qualified by using the static keyword.

Box 4: No
Wrapper methods must always call next.

Note: Wrapper methods in an extension class must always call next, so that the next method in the chain and, finally, the original implementation are always called. This restriction helps guarantee that every method in the chain contributes to the result.
In the current implementation of this restriction, the call to next must be in the first-level statements in the method body.

Here are some important rules:
-Calls to next can't be done conditionally inside an if statement.
-Calls to next can't be done in while, do-while, or for loop statements.
-A next statement can't be preceded by a return statement.
-Because logical expressions are optimized, calls to next can't occur in logical expressions. At runtime, the execution of the complete expression isn't guaranteed.


Reference:

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



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You are a Dynamics 365 Finance developer.
You have the following code: (Line numbers are included for reference only.)


You need to evaluate the code.
What is the correct output for the method? To answer, select the appropriate option in the answer area.

NOTE: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




Box 1: One, Two, Four, Fire
The statements in the finally clause are executed when control leaves the try block, either normally or through an exception.
Box 2: One, Three, Four, Five
Box 3: One, Three
Return ends the call.
Box 4: One, Three, One, Two, Four, Five Retry restarts the try statement.


Reference:

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-exceptions



Page 34 of 66



Post your Comments and Discuss Microsoft MB-500 exam with other Community members:

the coder1 commented on December 11, 2024
It helped alot
UNITED KINGDOM
upvote

Ek commented on June 29, 2024
It helped alot
INDIA
upvote

Tom commented on March 18, 2022
i purchased this exam dumps from another website with way more questions but they were all invalid and outdate. this exam dumps was right to the point and all from recent exam. it was a hard pass.
UNITED KINGDOM
upvote

Tom commented on March 18, 2022
I purchased this exam dumps from another website with way more questions but they were all invalid and outdate. This exam dumps was right to the point and all from recent exam. It was a hard pass.
UNITED KINGDOM
upvote

Eddie commented on September 20, 2021
These notes are pretty informative along with the questions. I helped a lot.
UNITED STATES
upvote