T210: MasterDetailAndCustomizedForms
Version: 2025R1
Category: Technical
How to Use This Course
The T210 Customized Forms and Master-Detail Relationship course shows how to customize existing Acumatica ERP forms and define the master-detail relationship. In this course, you will learn how to add custom controls and tabs to an existing Acumatica ERP form. You will also learn how to implement the UI logic, calculations, and insertion of a default detail record by using Acumatica Framework. The course is intended for application developers who are starting to learn how to customize Acumatica ERP. The course is based on a set of examples that demonstrate the general approach to customizing Acumatica ERP. It is designed to give you ideas about how to develop your own embedded applications by using the customization tools. As you go through the course, you will continue development of the customization for the cell phone repair shop, which was started in the T200 Maintenance Forms training course. We recommend completing T200 Maintenance Forms before you complete this one; if you have not completed that course, a prerequisite step will explain how to publish the customization project that contains the results of T200 Maintenance Forms. Aer you complete all the lessons of the course, you will be familiar with the basic programming techniques for the customization of existing Acumatica ERP forms and for the implementation of the business logic of an Acumatica ERP form.
We recommend that you complete the examples in the order in which they are provided in the course,
because some examples use the results of previous ones.
What the Course Prerequisites Are
To complete this course, you should be familiar with the basic concepts of Acumatica Framework. We strongly recommend that you complete the T200 Maintenance Forms training course before you begin this course. To complete the course successfully, you should have the following required knowledge:
- Proficiency with C#, including but not limited to the following features of the language:
- Class structure
- OOP (inheritance, interfaces, and polymorphism)
- Usage and creation of attributes
- Generics
- Delegates, anonymous methods, and lambda expressions
- Knowledge of the following main concepts of ASP.NET and web development:
- Application states
- The debugging of ASP.NET applications by using Visual Studio
- The process of attaching to IIS by using Visual Studio debugging tools
- Client- and server-side development
- The structure of web forms
- Experience with SQL Server, including doing the following:
- Writing and debugging complex SQL queries (WHERE clauses, aggregates, and subqueries)
- Understanding the database structure (primary keys, data types, and denormalization)
- The following experience with IIS:
- The configuration and deployment of ASP.NET websites
- The configuration and securing of IIS How to Use This Course | 6
What Is in a Part
Each part of the course is dedicated to implementation of a particular scenario of customization of an existing
Acumatica ERP form or to implementation of a particular business logic on example of a custom form.
Each part of the course consists of lessons you should complete.
What Is in a Lesson
Each lesson is dedicated to a particular development scenario that you can implement by using Acumatica ERP
customization tools and Acumatica Framework. Each lesson consists of a brief description of the scenario and an
example of the implementation of this scenario.
The lesson may also include Additional Information topics, which are outside of the scope of this course but may be
useful to some readers.
Each lesson ends with a Lesson Summary topic, which summarizes the development techniques used during the
implementation of the scenario.
Where the Source Code Is
You can find the source code of the customization described in this course and code snippets for the course in the
Customization\T210 folder of the Help-and-Training-Examples repository in Acumatica GitHub.
What the Documentation Resources Are
The complete Acumatica ERP and Acumatica Framework documentation is available at https://help.acumatica.com/
and is included in the Acumatica ERP instance. While viewing any form used in the course, you can click the Open
Help button in the top pane of the Acumatica ERP screen to bring up a form-specific Help menu; you can use the
links on this menu to quickly access form-related information and activities and to open a reference topic with
detailed descriptions of the form elements.
Which License You Should Use
For the educational purposes of this course, you use Acumatica ERP under the trial license, which does not require
activation and provides all available features. For the production use of the Acumatica ERP functionality, an
administrator has to activate the license the organization has purchased. Each particular feature may be subject to
additional licensing; please consult the Acumatica ERP licensing policy for details.
Company Story and Customization Description | 7
Company Story and Customization Description
In this course, you will continue the development for the cell phone repair shop of the Smart Fix company that you have started in the T200 Maintenance Forms training course.
If you have not completed this training course, you will load and publish the customization project
with the results of this course in Initial Configuration.
In the T200 Maintenance Forms training course, you have created two simple maintenance forms for the Smart Fix company:
- Repair Services (RS201000), which contains the list of the company's repair services
- Serviced Devices (RS202000), which lists the devices that can be serviced In this course, you will create another maintenance form, Services and Prices (RS203000), which gives users the ability to define and maintain the price for each provided repair service. You will also customize the Stock Items (IN202500) form of Acumatica ERP to mark particular stock items as repair items—that is, the items that are supplied to the customer (such as replacement screens and batteries) as part of the repair services.
Services and Prices Form
The Services and Prices (RS203000) form, which you will create in this course, will look as shown in the following screenshot.
Figure: Services and Prices form
The form will contain the following tabs:
- Repair Items: Will show the list of repair items (stock items) necessary for the repair service and device selected in the Summary area of the form.
- Labor: Will represent the work (the list of non-stock items) that is performed for the repair service and device selected in the Summary area of the form. Company Story and Customization Description | 8
- Warranty: Will include the list of contract templates for the repair service and device selected in the
Summary area of the form.
You will also create a substitute form of the inquiry type, which will serve as the entry point to the form.
This form displays the data entered on the Services and Prices form in a tabular format. The generic inquiry will function as a substitute form because it will be brought up instead of the form when a user clicks the form name in a workspace.
These forms will use the following custom tables, which you have added to the application database in Initial Configuration: - RSSVRepairPrice: The data of this table is displayed in the Summary area of the form.
- RSSVRepairItem: The data of this table is displayed on the Repair Items tab.
- RSSVLabor: The data of this table is displayed on the Labor tab.
- RSSVWarranty: The data of this table is displayed on the Warranty tab.
Customization of the Stock Items Form
The custom elements that you will add to the Stock Items (IN202500) form are shown in the following screenshot.
Figure: Stock Items form
The customization of the Stock Items form will include the following changes:
- The Repair Item check box, which you will add to the Item Defaults section of the General tab, will be used to define whether the selected stock item is a repair item.
- The Repair Item Type box, which you will also add to the Item Defaults section of the General tab, will hold the repair item type to which the repair item belongs, which is one of the following: Battery, Screen, Screen Cover, Back Cover, or Motherboard.
- You will add the Compatible Devices tab, which will be used to define and maintain a list of compatible serviced devices for the selected repair item. This tab will appear on the form only if the Repair Item check box is selected. The customized Stock Items form will use the RSSVStockItemDevice custom table, which you have added to the application database in Initial Configuration. The form also uses the custom UsrRepairItem and Company Story and Customization Description | 9
UsrRepairItemType fields of the InventoryItem database table. You will add these custom fields in Part 1: Custom Fields (Stock Items Form). Initial Configuration | 10
Initial Configuration
You need to perform the prerequisite actions before you start to complete the course. If you have deployed an instance for the T200 Maintenance Forms course and have the customization project and the source code for this course, you can perform only Step 3: Creating the Database Tables.
Step 1: Preparing the Environment
If you have completed the T200 Maintenance Forms training course and are using the same
environment for the current course, you can skip this step.
You should prepare the environment for the training course as follows:
- Make sure that the environment that you are going to use conforms to the System Requirements for the Acumatica ERP Installation.
- Make sure that the Web Server (IIS) features that are listed in Configuration of IIS Web Server Features are turned on.
- Install the Acuminator extension for Visual Studio.
- Clone or download the customization project and the source code of the extension library from the Help- and-Training-Examples repository in Acumatica GitHub to a folder on your computer.
- Install Acumatica ERP. On the Main Soware Configuration page of the Acumatica ERP Setup wizard, select
the Install Acumatica ERP and Install Debugger Tools check boxes.
If you have already installed Acumatica ERP without debugger tools, you should remove Acumatica ERP and install it again with the Install Debugger Tools check box selected. The reinstallation of Acumatica ERP does not affect existing Acumatica ERP instances. You can also install the Acumatica ERP Tools separately. For details, see Acumatica ERP Installation On- Premises: To Install the Acumatica ERP Tools (Optional).
Step 2: Preparing the Needed Acumatica ERP Instance for the Training Course
If you have completed the T200 Maintenance Forms training course, instead of deploying a new
instance, you can use the Acumatica ERP instance that you have deployed for the T200 Maintenance
Forms training course.
You deploy an Acumatica ERP instance and configure it as follows:
- Open the Acumatica ERP Configuration wizard, and do the following:
a. Click Deploy a New Acumatica ERP Instance for T-Series Developer Courses.
b. On the Instance Configuration page, do the following:
a. In the Training Course box, select T210 Customized Forms and Master-Detail Relationship.
b. In the Local Path to the Instance box, select a folder that is outside of the C:\Program Files
(x86), C:\Program Files, and C:\Users folders. (We recommend that you store the website
folder outside of these folders to avoid an issue with permission to work in these folders when you
customize the website.)
Initial Configuration | 11
c. On the Database Configuration page, make sure the name of the database is SmartFix_T210. The system creates a new Acumatica ERP instance, adds a new tenant, loads the data to it, and publishes the customization project that is needed for activities of this training course. - Make sure that a Visual Studio solution is available in the App_Data\Projects\PhoneRepairShop
folder of the Acumatica ERP instance folder.
This is the solution of the extension library that you will modify in the activities of this training course. - Sign in to the new tenant by using the following credentials:
- Username: admin
- Password: setup Change the password when the system prompts you to do so.
- In the top right corner of the Acumatica ERP screen, click the username, and then click My Profile. The User Profile (SM203010) form opens. On the General Info tab, select YOGIFON in the Default Branch box; then click Save on the form toolbar. In subsequent sign-ins to this account, you will be signed in to this branch.
- Optional: Add the Customization Projects (SM204505) and Generic Inquiry (SM208000) forms to your favorites.
For details about how to add a form to your favorites, see Favorites: General Information.
If for some reason you cannot complete instructions in this step, you can create an Acumatica ERP instance and manually publish the needed customization project as described in Appendix A: Initial Configuration.
Step 3: Creating the Database Tables
Create the database tables that are necessary for the T210 Customized Forms and Master-Detail Relationship training course and include the scripts in the customization project as follows:
- In SQL Server Management Studio, execute the T210_DatabaseTables.sql script to create the database tables that are necessary for the T210 Customized Forms and Master-Detail Relationship training course. The script creates the following tables: RSSVRepairPrice, RSSVRepairItem, RSSVLabor, RSSVWarranty, and RSSVStockItemDevice.
- The script is provided in the Customization\T210\SourceFiles\DBScripts folder, which you have downloaded from Acumatica GitHub.
- If you use the Acumatica ERP instance that you have deployed for the T200 Maintenance Forms training course, you need to change the name of the database in the script from SmartFix_T210 to SmartFix_T200 before execution of the script.
- On the Database Scripts page of the Customization Project Editor that is open for the PhoneRepairShop customization project, for each added table, do the following: a. On the page toolbar, click Add Custom Table Schema. b. In the dialog box that opens, select the table and click OK.
- Publish the project.
The design of database tables is outside of the scope of this course. For details on designing database tables for Acumatica ERP, see Designing the Database Structure and DACs.
Part 1: Custom Fields (Stock Items Form) | 12
Course Structure
Part 3: Custom Tab (Stock Items Form)...................................................................................................62
Part 4: Calculations and Insertion of a Default Record (Services and Prices Form)...................................... 72
Part 1: Custom Fields (Stock Items Form)
Part 2: Master-Detail Relationship and Business Logic
Part 3: Custom Tab (Stock Items Form)
Part 4: Calculations and Insertion of a Default Record
Additional Information
This course includes appendices with supplementary reference material. See the full course content for details.