Best practices for updating choices?

JennyHu
Tera Guru
Tera Guru

Hi there,

I'm working on a custom application.   There is a database field of type "Choice".  

If requirements change down the road, and some choices need to be removed and some new choices need to be added.   What is the recommended course of action?

1) delete the Choices?

2) inactivate the Choices?

3) delete the entire Choice Set, and create a new Choice Set?

What would happen to any existing records that have the deleted / inactivated choices saved?

Is it possible to still generate reports and query on the old choices?

Thank you in advance.

Jenny

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Jenny,



Best practice is to just set inactive=true on those choices you no longer need. They are still in the database, the records still have values that point to old options, but they are no longer selectable. Yes, you can still report on them.



Underlying theme: Whenever possible, don't delete stuff - especially stuff that is being referenced from other records.



Reference:


ServiceNow Wiki: Technical Best Practices


View solution in original post

3 REPLIES 3

Chuck Tomasi
Tera Patron

Hi Jenny,



Best practice is to just set inactive=true on those choices you no longer need. They are still in the database, the records still have values that point to old options, but they are no longer selectable. Yes, you can still report on them.



Underlying theme: Whenever possible, don't delete stuff - especially stuff that is being referenced from other records.



Reference:


ServiceNow Wiki: Technical Best Practices


Thank you very much Chuck! I will have the Best Practices website bookmarked.    


You are welcome Jenny. I have a fair amount of years invested in to building those pages.



Thanks for using the community!