Microsoft
MB-500 · Question #348
MB-500 Question #348: Real Exam Question with Answer & Explanation
The correct answer is A. Yes. Declare the SalesTable table on line 06 and insert a new line after line 06 to declare the SalesInvoiceHeaderFooterTmp table. Populate the new fields by calling the method populateSalesInvoiceHeaderFooterTmp on line 08. With Chain of Command (CoC) there is no need to create anoth
Question
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. A company is using a Dynamics 365 finance and operations app. The accounting department requests two custom fields named CusStatus and CusDiscount for the header of the sales invoice SSRS report. The custom fields are in the SalesTable table. You create a duplicate of the report design and add the two new fields to a temporary table by using the following extension: You need to populate the new fields by using Chain of Command (CoC). Solution: Declare the SalesTable table on line 06 and insert a new line after line 06 to declare the SalesInvoiceHeaderFooterTmp table. Populate the new fields by calling the method populateSalesInvoiceHeaderFooterTmp on line 08. Does the solution meet the goal?
Exhibit
Options
- AYes
- BNo
Explanation
- Declare the SalesTable table on line 06 and insert a new line after line 06 to declare the SalesInvoiceHeaderFooterTmp table. Populate the new fields by calling the method populateSalesInvoiceHeaderFooterTmp on line 08. With Chain of Command (CoC) there is no need to create another method. Use the declared method populateSalesInvoiceHeaderFooterTmp recursively. * Create a new method on the MySalesInvoiceDP_Extension class named populateInvoiceHeaderFooterCustom which uses the CustInvoiceJour table as a parameter. Declare the SalesTable and SalesInvoiceHeaderFooterTmp tables on the new method. Populate the new fields by using the _custInvoiceJour parameter to reference SalesTable. * Create a new method on the MySalesInvoiceDP_Extension class named populateInvoiceHeaderFooterCustom which uses the CustInvoiceJour table as a parameter. Declare the SalesTable and SalesInvoiceHeaderFooterTmp tables on the new method on line 07. Populate the new fields by using the _custInvoiceJour parameter to reference SalesTable. Call the new method on the populateSalesInvoiceHeaderFooterTmp method on line 08. * Declare the SalesTable table on line 06 and insert a new line after line 06 to declare the SalesInvoiceHeaderFooterTmp table. Populate the new fields by using the custInvoiceJour parameter with a reference to SalesTable. Note: 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. For example, a model contains the following code. class BusinessLogic1 str doSomething(int arg) You can now augment the functionality of the doSomething method inside an extension class by reusing the same method name. An extension class must belong to a package that references the model where the augmented class is defined. [ExtensionOf(classStr(BusinessLogic1))] final class BusinessLogic1_Extension str doSomething(int arg) var s = next doSomething(arg + 4); In this 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 https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/extensibility/method-
Community Discussion
No community discussion yet for this question.
