Home Blog Acumatica xRP Framework: Reusable ASPX Definitions

Acumatica xRP Framework: Reusable ASPX Definitions

Kyle Vanderstoep | May 9, 2022

Acumatica xRP Framework: Reusable ASPX Definitions


Acumatica has spent a lot of time thinking about making its xRP Framework as developer-friendly as possible. In many different places, efforts have been made to reduce code duplication and to provide quasi “object-oriented” methods for managing elements in the framework. One of those places I will demonstrate to you today is the definition of ASPX Pages.

When one is writing custom ASPX pages in Acumatica ERP, the xRP framework allows for reused ASPX definitions to be referenced from a common file, instead of having to copy and paste a common control over and over across multiple pages. Imagine you have three pages, all with the same popup control.


This is a bit dangerous because if you one day need to make a change to the popup definition, you have to copy the changes across 3 different files, and remember all the files in which the change needs to be made! Sounds like a recipe for a bug.

GIST: https://gist.github.com/lekker-solutions/39bf17b24bd304dcbbc45469c7d9cd13

What you can do instead, is extract the popup definition out of the ASPX files, and into its own include file (use file extension .inc)


Acumatica will pull the ASPX definition out of the PopupDefinition.inc file, and combine it with the IN000000.aspx, IN000001.aspx and IN000002.aspx files. Therefore, you only need to make changes to the popup definition in one place, and it will be included wherever it is referenced!

GIST: https://gist.github.com/lekker-solutions/163b69bd328f4414459a66ca8e1d3a1e


This is a very useful tool for creating common ASPX definitions across multiple Acumatica screens. Along with common business logic extensions, one can write a single definition for business logic and presentation, and use it across many pages.

Cheers to another tool to avoid code duplication!

Hope this has been helpful and always…

Happy Coding!

Blog Author

Kyle has been interacting with ERP systems from a young age. His first allowance came from testing his Dad's customizations on the MAS 500 platform. Kyle studied and worked in the mechanical engineering field for nearly a decade and realized that pivoting back to software would be the best course of action. A request to create some basic customizations for a soon-to-be Acumatica user in the Bay Area hooked Kyle on Acumatica's xRP platform. Since then, it has been his only focus. Kyle develops independently as well with partners such as Nims & Associates, a local Bay Area VAR. In this capacity, he has developed and configured significant vertical integrations for Acumatica end-users, in a wide range of industries from genetic testing to contract bond and insurance services. In his free time, Kyle enjoys trail running, ski mountaineering, and hunting.

Receive blog updates in your Inbox.