Acumatica as most of web applications has some configurations that are stored on the file system. For example it can be a web.config or any other file that is stored in Site folder itself.
So that means if you do custom configuration (like redirection rules, filters or custom controls) your changes most probably will be lost right after update. There are several exceptions when configurations will not be overridden:
- You keep configurations in separate (not standard) file. Acumatica will not touch any file that is included into standard Acumatica.
- Some specific changes can be preserved by Acumatica Configuration wizard. Connection String, Active Directory, SSO, timeouts are the example of preserved configurations.
Disclaimer: Please note that all manual changes in the standard Acumatica in the way that is not recommended in appropriate Development and Customization guides are not supported.
If you still have it or want to have - use it at your own risk. Acumatica cannot support and guarantee that your changes will work in the future.
With great power comes great responsibility!
Ok, still want to have some reconfiguration? In this case better to ensure that your changes will be applied automatically with Instance upgrade.
Luckily Acumatica has a place where you can code such things - Customization Plug-In. Customization Plug-In is a separate code file with class that Acumatica can dynamically compile and load during publication process. Class events will be automatically subscribed and executed on Database or/and Files operations.
Note that customization plug-in should be in customization project itself as a code file. If you include it into the customization DLL it might not been executed.
Also note that that OnPublished event (described below) is depend on UseRuntimeCompilation key in web config. If Acumatica cannot compile and run code dynamically this method may not be executed. Execution of the UpdateDatabase method does not depend on the UseRuntimeCompilation key value.
There are 2 events:
- OnPublished - here you can access file system and do proper configuration prior application be restarted.
- UpdateDatabase - here you can have some operations that should be executed to ensure your own database update scripts.
Here I have short example, how we can add (or change) packages configuration in Acumatica ERP right from Customization
On the publication, you will see new comments in the log window:
Have a safe customization!