Solved

Custom fields and Publishing / Unpublishing Customization Projects

  • 3 January 2024
  • 2 replies
  • 93 views

Userlevel 1

I wanted to check best practice about Custom Fields. If you add a field to the Customization Project, publish the Customization Project, remove the field, and then publish again, then I think the field is deleted from the database. What happens if you unpublish the customization project, does the field get deleted too? Does the project check if any values are in the column being deleted from the database? Do I need to Export and Import to make sure I don’t loose the custom field data.

I know that you have to unpublish customizations before upgrading versions so I don’t want to lose custom field data. Also, as this is a SaaS environment, who does the unpublish/publish when the upgrade is done automatically? 

If you have a number of tenants and the customization project is on an old tenant that then gets deleted, can you load the Customization Project to the current tenant so you can manage the Custom Field, and should you do this before or after the other tenant is deleted? Is it ok to have the same Customization Project on all tenants or is that confusing?

If someone can point me at some documentation about the lifecycle of Custom Fields and what happens in these scenarios it would be much appreciated. Many thanks.

icon

Best answer by dcomerford 3 January 2024, 20:00

View original

2 replies

Userlevel 7
Badge +12

When you publish the Custom field for the first time it adds it to the DAC (where you can see it on the screen in Acumatica) and it also created a SQL script to add the field to the SQL database table.

If you unpublish the custom field or were to delete it from the package all you are doing is removing it from the DAC (so it is no longer visible on a form etc) however it does not remove it from the SQL database so any stored details will remain in the database table and if the field was ever republished it would reappear with the data previously stored.

If you had published a new field in error and wanted to remove it from the database you would need to write a SQL script and publish that to delete the column.

 

With regard to customisation personally i only recommend the packages are on one tenant and then published to all tenants from there. So if you were deleting a tenant and it had the packages then export them and import them in to the main tenant and publish them again

Hope this makes sense.

Userlevel 1

There seem to be lots of considerations on this. I agree that just having the custom fields in one tenant is good practice, but if you want to add the custom fields to the Web Service Endpoint, then I had to have the customization project with the custom fields in each tenant on the instance. But, it is all working now.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved