Skip to main content
wenh0002
March 29, 2024
Question

What's the best practice around deprecating a datasync-enabled record type?

  • March 29, 2024
  • 6 replies
  • 0 views

I have a record type that has been deprecated. I'd like to drop the table from the database and rename the record type to start with DEPRECATED; then disable data sync and disconnect the table. However this record will become invalid and fail to deploy. What's the best practice? 

6 replies

stefanhelzle0001
Brainy
March 29, 2024

I think the most important step is to restrict access by modifying the security settings and deploying that change to all environments.

After making sure that there are no dependencies anymore, you will have to manually delete the record and drop the table on all environments. While you could drop a table using a deployment SQL script, that would break the record without the option to delete that record through a deployment.

wenh0002
wenh0002Author
March 29, 2024

Good suggestion on security. 

Are you suggesting it is possible to delete the record through a deployment? As far as I know, deletion is manual and cannot be done through a deployment. 

davidj137213
Brainy
March 29, 2024

In addition to changing the security settings, it would also be interesting to change the registry description (Adding DEPRECATED), to warn users to stop using that record (I think it's better than change object name)

mathieud0001
March 30, 2024

What I usually do is transform it into a service backed Record Type with an empty recordDataSource. You mark it as deprecated, deploy it everywhere. You can then drop the tables. Once all that is done, you can go ahead and remove the Record in all your environments.