How to Build Custom Screens in Acumatica
Introduction
Acumatica ERP's flexibility is one of its most powerful features, allowing developers to create custom screens that extend the platform's functionality. Whether you need a specialized data entry form, a custom dashboard, or a unique user interface for specific business processes, Acumatica provides the tools to build these solutions.
In this guide, we'll explore how to build custom screens in Acumatica, covering everything from basic concepts to advanced implementation techniques. You'll learn about the Screen Editor, data entry forms, and best practices for creating user-friendly interfaces.
Understanding Acumatica Screens
Acumatica screens are the primary interface through which users interact with the ERP system. Each screen is defined by a graph class that controls the business logic and a DAC (Data Access Class) that defines the data structure. Understanding this architecture is crucial for building effective custom screens.
Screens in Acumatica are built using a combination of ASPX pages and C# graph classes. The ASPX defines the visual layout, while the graph class handles the data operations and business logic. This separation allows for clean, maintainable code that can be easily customized.
Screen Types and Components
Acumatica offers several types of screens, each serving different purposes:
- Entry Screens - Data entry forms for creating and editing records
- Inquiry Screens - Read-only screens for viewing data
- Processing Screens - Screens that perform batch operations
- Dashboard Screens - Visual dashboards with charts and KPIs
- Master-Detail Screens - Screens with parent-child relationships
Each screen type has specific components including data views, form layouts, grids, and action buttons. Understanding these components helps you choose the right approach for your custom screen.
Creating a Custom Screen
Let's walk through creating a custom screen for managing project tasks. First, you need to define the DAC:
[Serializable]
public class PMTaskExt : PXCacheExtension
{
[PXString(50)]
[PXUIField(DisplayName = "Custom Field")]
public string UsrCustomField { get; set; }
public abstract class usrCustomField : PX.Data.BQL.BqlString.Field { }
}
Next, create the graph class that handles the business logic:
public class ProjectTaskEntry : PXGraph
{
public PXSelect Tasks;
protected virtual void PMTask_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
{
var row = (PMTask)e.Row;
// Add custom logic here
}
}
Finally, create the ASPX page that defines the visual layout:
Data Entry Forms
Data entry forms are crucial for user productivity. When building custom data entry screens in Acumatica, consider these guidelines:
- Group related fields - Organize fields logically by function
- Use appropriate field types - Choose the right control for each data type
- Implement validation - Add proper validation at both field and record levels
- Provide defaults - Set sensible defaults to reduce data entry
- Enable keyboard navigation - Allow efficient tab navigation between fields
Acumatica provides various field controls including text fields, dropdowns, date pickers, checkboxes, and more. Use PXTextField, PXDropDown, PXDateTimeEdit, and other controls to build effective forms.
Best Practices
- Follow naming conventions - Use consistent naming for screens, fields, and actions
- Implement proper caching - Use PXCache to improve performance
- Handle exceptions gracefully - Provide meaningful error messages
- Test thoroughly - Test all user interactions and edge cases
- Document your work - Maintain documentation for future maintenance
- Use version control - Keep your code in version control
Summary
Building custom screens in Acumatica is a powerful way to extend the ERP system to meet your specific business needs. By understanding the architecture, following best practices, and using the proper development tools, you can create intuitive and efficient user interfaces.
For more information, check out our other tutorials on Acumatica Customization Basics and Automation Screens.