Hi James. Thanks for resolving this.
As for a possible future and similar situation, please check the below and save it in a 'documentation' folder of some kind:
In the end, it indeed needs several mssql queries to be executed onto the mdb database.
Find the form_entity_id for the form you want to delete.
You can get this from the usm_form_entities table by executing these queries:
1 select * from usm_form_entities where form_entity_name like '%Junk%'
Take the form_entity_id from the above result and execute:
2 select * from usm_rate_definition where text_1 ='<form_entity_id>'
Check the values of columns text_1 and text_2 in the above query result
Then execute:
3a update usm_rate_definition set text_1='Null' where text_1='<form_entity_id>'
3b update usm_rate_definition set text_2='Null' where text_2='Junk'
You can run the following queries to see if the form is part of any active request:
select r.request_id,r.status,rif.* from usm_request r
join usm_subscription_detail sd on r.request_id = sd.request_id
join usm_request_item_form rif on sd.id = rif.subscription_detail_id
where rif.form_elem_name like '%addr1_%'
Or, in your case, where you do not know the <form_elem_name> anymore:
select * from USM_FORM_ENTITIES where form_entity_type = 2 and form_entity_name like '%Junk%'
Take the form_entity_id value from the above query result and execute:
select request_id,* from usm_subscription_detail where text_1 ='<form_entity_id>'
Take the request_id from the above query result and execute(for each request_id):
delete from usm_request where request_id = '<request_id>'
delete from usm_subscription_detail where request_id = '<request_id>'
After this:
1 Stop the SC service
2 Empty the translets folder
3 Empty the brower cache
4 Login to SC-UI
5 You will be able to delete the form, from SC/catalog/Forms/Forms>Junk in the UI
Kind regards, Louis.