Skip to main content

Hi Team,

We have a scenario where we need to update a column of a table across all the tenants during publishing of the package from any of the Tenant.

Is it possible to Achieve this? if yes can you please share us the code sample.

Thanks in Advance.

Hi @praveenpo depending on the type of data and tables you need to update; you could add a standard SQL script to the package. This ensures it runs at the table level and will apply to all tenants. This won’t have any application logic and will run every time you publish, so have this in mind when you write the script.
If you need finer control, you can write a CustomizationPlugin class that overrides the UpdateDatabase method to perform the update through code. Here is an article with an example for this option: https://www.acumatica.com/blog/customization-plugin-packages-configuration/

Please note that you may need to use PXLoginScope to perform operations between tenants. Here is more information about scopes: https://asiablog.acumatica.com/2015/11/using-scopes-in-acumatica.html


Reply