TDD Sample
TDD Sample
TDD Sample
Prepared for
Contoso
Project
Table of Contents
1 Technical Design Planning ................................................................................................................ 2 Overview ......................................................................................................................................................... 2 Timetable ........................................................................................................................................................ 2 Roles and Responsibilities .............................................................................................................................. 2 2 3 4 5 6 7 Review Design Document ................................................................................................................. 3 Document User Interface .................................................................................................................. 4 Forms .............................................................................................................................................................. 4 Define Process.................................................................................................................................. 6 Validation Options .......................................................................................................................................... 6 Define Data Modifications ................................................................................................................ 7 Dependencies and Assumptions ....................................................................................................... 8 Security Strategy Summary............................................................................................................... 9 Security Requirements ................................................................................................................................... 9 Security Plan ................................................................................................................................................... 9 Roles-based Security Matrix ........................................................................................................................... 9
1
Overview
Microsoft Dynamics AX functional and technical understanding is needed to plan this Technical Design Document. A developer needs to know how the AX functional part works and what options will affect functionality of other forms or processing. The AX AOT is used to add new or modify existing objects, elements. AOT expert understanding will help to develop a solution with least amount of changes.
Timetable
1. 2. 3. 4. 5. Study of functional document Discussion with functional consultant Study of Existing development Determine what needs to be added or changed. Estimate the timeframe to do development, testing and re-work and re-test
Contosos purchasing department often orders product based on a vendor minimum order value in order to receive a multiplier discount. A developer will modify the AX Vendor form and Purchase order form to reflect the minimum order value for any specified vendor and display it onto a Purchase order. Should the user try to Post the purchase requisition, an info log will be displayed stating that the vendor minimum order value has not been met. The vendor minimum will be displayed onto the purchase order as well as a running total (net value) of the purchase order for a visual reference. NOTE: Further details can be reviewed within the corresponding Functional Design Document.
3
Forms
Forms: VendParameters, VendTable, PurchTable New group: Vendor Minimums F1: Create new checkbox parameter on Purchase order tab labeled Use Vendor Minimum? When clicked, this will enable the new field Vendor min amount. This checkbox will also be copied from the vendor record onto the Purchase order header as a display only. F2: Create new field to be placed beneath F1 labeled Vendor min amount. When a value is entered into this field, it will be copied onto the Purchase order new field Vendor minimum as a display only.
F3: Create a new display field on the Purchase order header > Setup tab that displays the value set in F1. If the value is set to true, populate F4.
F3: display F1
F4: Create new display field on the Purchase order header beneath the buttons labeled Vendor minimum that displays the value entered in F2. F5: Create new display field on the Purchase order header > beneath F4 labeled Total Net. This field will be a calculation (sum) for all PurchLine.LineAmount on this order.
Define Process
Validation of minimum amount will be based on Parameter form and can be further overridden at the vendor table form. Minimum order Amount limit is controlled from Vendor table form. The field values minimum amount and uses minimum amount check field that will be transferred to Purchase order form. Based on purchase line amount running total and use minimum amount check option, when posting of the purchase order is attempted. System will validate based on conditions if a message needs to be displayed and posting to be stopped. Message to be displayed after condition not met is The vendor minimum order value has not been met.
Validation Options
The Validation Options will in the Use Minimum Amount check box and the Minimum Order Amount.
Message When the validation fails, the system will halt processing and display message as The vendor minimum order value has not been met.
5
Modified Tables
Table Name: VendParameters, VendTable, PurchTable There will be new fields in VendParameters, VendTable and PurchTable. Data will be populated from VendParameter and Purchtable data will be initialized from initFormPurchTable based on VendTable. When Posting is taking place, data will be validated at PurchFromLetter class using Validate method. Validate method will control message. Modified or New Fields: Field Label: Use Vendor Minimum Vendor Min Amount Display Total Net initFromPurchTable Help Text: EDT/Type: Enum NoYesId EDT PurchLIneAmount Display Method Notes: All 3 Tables VendTable and PurchTable PurchLineAmount Method on PurchTable
Class Name:
LineAmountMinimumCheck
Method Validate is standard method in class PurchFormLetter, this method is always called before any type of purchase order posting is initiated. LineAmountMinimumCheck will be called from Validate method. LineAmountMinimumCheck is a new method, which will return success or failure of validation, based on functional design document requirement. This method will also display required message.
Assumptions: Vendor Parameter form option Use Minimum Amount Enable option set, at least one vendor created , Vendor will get option defaulted from vendor parameter only when option is set before creating new vendor, else vendor option needs to be independently set. Even though parameter option is set, it can be overridden by independently setting for each vendor.
Dependencies: Posting message and validation depends on Vendor parameter option enabled and further vendor option enabled.
7
Security Requirements
Security Plan
There has been no Security Plan requested so standard Microsoft Dynamics AX Security rules will take effect.