Skip to main content
Solved

Update data from one Tenant to another Tenant

  • 1 July 2024
  • 1 reply
  • 32 views

praveenpo
Semi-Pro II
Forum|alt.badge.img+3

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.

Best answer by Marco Villasenor

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

View original
Did this topic help you find an answer to your question?

1 reply

Marco Villasenor
Jr Varsity II
Forum|alt.badge.img+2

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings