nerdexam
Microsoft

MB-500 · Question #301

Case study 4 - ADatum Corporation Background ADatum Corporation is a market leader in the design and distribution of innovative aluminum systems. The company provides services to the architectural…

The correct answer is B. [Hookable(false)]. A method named processAttachment must be created so that extenders are not able to subscribe to pre-events and post-events. A base class named MigrateAttachment must be designed with methods that all child classes D365 Extensibility Attributes To control the Extensibility of…

Design and develop AOT elements

Question

Case study 4 - ADatum Corporation Background ADatum Corporation is a market leader in the design and distribution of innovative aluminum systems. The company provides services to the architectural, residential, industrial, and home improvement markets in Australia. The company has warehouses in Perth. Sydney, and Melbourne. A team of warehouse employees provides delivery to the customer sites. Current Environment ADatum Corporation currently uses Microsoft Dynamics AX 2009. Customers use email or phone calls to place orders. After the company provides a quote to customers, the customer must agree to the sale price before the company places a sales order. The company is migrating to Dynamics 365 Finance and Dynamics 365 Supply Chain Management using a phased rollout strategy to its sites. The company has the Lifecycle services project to manage various environments and releases. The company has the following Finance and Supply Chain Management environments: - Development - Quality assurance (QA) - User acceptance testing (UAT) - Production The company uses Azure DevOps for a code repository. All developers use a development branch to check in code and a release branch to maintain the code for production releases. Requirements. General - Configure a cloud-based development environment for Finance and Supply Chain Management. Enable a code extension that supports updates. - Configure Microsoft-supported version control and an Azure-hosted build pipeline. - Migrate all document handling attachments for the customers to Finance and Supply Chain Management from Dynamics AX 2009. - Audit X++ code for a best practice check. - All new code must be unit tested in a development environment and then validated by the QA team before the code is merged into the Release branch for further releases. Requirements. Business processes - All changes that are deployed to the UAT environment must be approved for code release to production. - The sales manager requires a solution that is extensible to ensure that new master tables document handling attachments are migrated to the new system. - A base class named MigrateAttachment must be designed with methods that all child classes must implement. - A method named processAttachment must be created so that extenders are not able to subscribe to pre-events and post-events. - On the All sales orders list page, two new fields must be added for the total sales order amount. One field uses goods and services tax (GST) and the other field does not use GST. - A process named Populate check data must be designed based on the following: The process must run from the All customers list page and populate a custom table named CustCheckData with 1000 rows. The table must have two fields named CheckNumber and BankNumber. The process must return to the current session after the data is processed. - The generated check data must be available for users to access in a tabular form without additional details and preview panes. - The purchase manager requires a new data entity to send out the information for purchase order inquiries that are generated in Finance and Supply Chain Management - The sales manager must be able to access the total quotation for the sites and item types. - The sales manager requires a quotation number to be printed on the sales invoice business document. Customers must be able to access the reference number on the invoice documents. - The purchase manager requires a new approval workflow for approving purchase orders that are more than $10,000. Requirements. Business systems - After a user named UserA posts a packing slip for a sales order, customers must be informed of the product delivery in real-time. This information is provided using business events. - Purchase order inquiries must be exported from the Finance and Supply Chain Management using data packages. Users must be able to query using OData but should not be able to update or create the data in the system. - A sales manager's workspace must display the total quotations using key performance indicators. - The purchase order approval workflow must be configured from the procurement and sourcing module. Issues - UserA reports delays when opening the All sales orders list page. - A customer is unable to access the business events for a packing slip that is posted by UserA. - A user named UserB reports that the system is unresponsive when they run the Populate check data process for a customer. - UserA reports that the print management settings in the accounts receivable module do not display the new layout when testing a new sales invoice report layout in the UAT environment. You need to design the processAttachment method for the MigrateAttachment class. Which attribute should you use?

Exhibit

MB-500 question #301 exhibit

Options

  • A[Wrappable(true)]
  • B[Hookable(false)]
  • C[Replaceable(true)]
  • D[Replaceable(false)]

How the community answered

(51 responses)
  • B
    94% (48)
  • C
    2% (1)
  • D
    4% (2)

Explanation

A method named processAttachment must be created so that extenders are not able to subscribe to pre-events and post-events. A base class named MigrateAttachment must be designed with methods that all child classes D365 Extensibility Attributes To control the Extensibility of our Custom code we have three attributes As we know we cannot create event handlers on methods that are Protected or private. So, using Hookable attribute in our code helps to control the event handlers (Pre or Post) and Extensions for our methods By using Hookable(true) attribute you can expose even Protected and private methods to event handlers (without Hookable attribute event handlers can be implemented only on public Similarly, you can disable event handlers for your methods by using Hookable(false) attribute. Note: by using Hookable(false) attribute it overrides CoC(Chain of command) as well and those methods cannot have extensions. If a method is replaceable, extenders can wrap it by using CoC, but they don't have to unconditionally call next. Although extenders can break the CoC, the expectation is that they will only conditionally break it. The compiler doesn't enforce calls to next. Wrappable attribute is used to control CoC (Chain of command) implementation for the methods Wrappable(false) can be used for public and protected methods to prevent Extending the method https://community.dynamics.com/blogs/post/?postid=f02da943-4897-40d9-a55b-b8fdd865e515

Topics

#Hookable attribute#event subscriptions#X++ extensibility#pre/post events

Community Discussion

No community discussion yet for this question.

Full MB-500 Practice