snc ui-component deploy --force

thomaszhao
Tera Expert

In the component deploy docs there is an option '--force' for the command

snc ui-component deploy

Its description is "Deploys component changes and overwrites any existing component records."

For anyone who is wondering what this option does currently, it seems to delete EVERYTHING ui-related that isn't the component(s) you're deploying, including all your UI Builder routes and pages.

thomaszhao_0-1707863660170.png

(Fortunately ServiceNow records all deleted records in sys_metadata_delete_list to be recovered)

I might be misinterpreting what "overwrites any existing component records" means, but I would have thought it would overwrite component records that conflict with the component I'm deploying, not wipe out everything related to Next Experience UI on the instance. Maybe someone more experienced can clarify what the --force option is for and if this is indeed the intended behavior.

1 REPLY 1

ArjunBasnet
Tera Guru

Exactly, one should be aware of executing. I am not sure why documentation is not clear on that. 

snc ui-component deploy --force

It can remove existing Experiences from the target instance, if it is using custom component deployed.