Home Blog Acumatica’s Customization Plugin: How to Add or Change a Package’s Configuration

Acumatica’s Customization Plugin: How to Add or Change a Package’s Configuration

Vinay Koppula | October 13, 2022

Acumatica's Customization Plugin: How to Add or Change a Package's Configuration

Introduction

I have worked on a good number of ISV integration solutions, and every time, unit testing in the new instances means I must enter or update the required settings of the integrations. These entries can be very annoying and time-consuming. I also noticed that most integrations require pre-configurations or settings, like integration setup, customer class, Order Types, default values, default Numbering sequence, etc. Every time an ISV solution is implemented, there will be a good amount of manual effort involved in setting up the initial configurations.

So, I was wondering, is there any possibility to plug & play the ISV solutions by capturing the settings automatically, without any manual effort? as I was searching for the solution, I found an article on Site Configuration using Customization by Sergey Marenich, which explains how we can add (or change) packages configuration in Acumatica ERP right from the Customization Plugin. This article helped me to understand and work on my requirement.

The Custom Plug-In is a Separate Code File

What I have learned is that Customization Plug-In is a separate code file with a class that Acumatica can dynamically compile and load during publication.

Class events are automatically subscribed and executed on Database and or Files operations.

The two Class events are:

  • OnPublished – here you can access the file system and do proper configuration prior to the application being restarted.
  • UpdateDatabase – here you can have some operations that should be executed to ensure your own database update scripts.

Here is the sample code snippet (Sample project available in GitHub):

GitHub: https://github.com/vinayrajk/CustomizationPlugin>

Below the class file is extracted from the sample project code from GitHub.

The Most Common Plugin Settings

Below are the most common settings I have used in the Integration Setup screen.

  • Default Customer– This can be used in marketplace integration if the orders are of Fulfilment by marketplaces.
  • Customer class– This can be defined if the integrations have a setting to select the customer class.
  • Numbering sequence– Set the default numbering sequence, which can change later.
  • Order Types– If the orders are to be identified separately, then a default value can be set in the setup screen, for example, for any marketplace integrations such as eBay, Amazon, Walmart, etc. A base Order type such as EB or WM can be created, and its value can be filled in the setup screens.
  • Any default values for any setup screen.

The above settings can be created or updated as soon as the package is deployed into the instance with a UpdateDatabase event.

Note: We must be cautious with the updated data, and it should not impact any other parts of sensitive data. 

Sample project is available in the GitHub, please follow https://github.com/vinayrajk/CustomizationPlugin.git

Summary:

Hopefully, this article will give you a good understanding on the usage of customization plugin and to plug & play the ISV solutions with the default settings that comes with the package.

Happy Coding!

Blog Author

Over the last twelve years, Vinay has developed business solutions using the .NET framework and moved to Kensium where he has spent seven years honing his skills in Acumatica. He has worked his way from developer to Development Manager, building out complex solutions and customizations within Acumatica. He has completed projects like IBS Imperium – an OEM solution for real estate management, store integrations like payment, tax extensions, and marketplace integrations. In his role as a developer manager, he contributes to training and mentoring new developers, helping them reach their career goals.

Receive blog updates in your Inbox.