The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
The community will be in read-only from Tuesday 11:59pm (PST) to Wednesday 7:30am (PST)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting unused forms & templates

SOLVED
Go to solution
Highlighted
Terry A. Moir
Esteemed Contributor

Deleting unused forms & templates

I'm trying to clean up some old, unused forms and templates, unused for any records. I can't delete some, as some users have them set as their defaults (even though their current role doesn't have access to them). I tried copying their role & moving their accounts to the new role with no luck.

We're in the process of upgrading 4.5 to the latest SP from SP 15. One idea I had was to force users forms.dat file to be updated, which I suspect will clear their default forms. Does anyone know which user file holds their default templates? Better yet, does anyone know of a way to force users default forms & templates from the Admin console (ie: over-ride their personal settings)? I don't want to change their views.dat file though...

Thanks...Terry
6 REPLIES
George M. Meneg
Honored Contributor

Re: Deleting unused forms & templates

Hello Terry,

About templates: You cannot delete templates that have been used even once. You could update directly the sd database but that's a bad idea.

Simply remove the template from the role definitions and your users won't be able to see them. Also alter their name (eg add a BLOCKED) or assign them to a new category (eg OLD)

About the forms, just remove the from from the role, and the users using that role won't see the form again. After that you will be able to delete them.
menes fhtagn
Terry A. Moir
Esteemed Contributor

Re: Deleting unused forms & templates

Templates & roles haven't been used - however I can't delete them as they are 'stuck' as user's defaults & I can't 'unstick' them. I tried logging in to a users account in our Test environment (db copied from Production), and opening a form. It opened with the correct form, as defined in the role, but even after that it still shows the other form as being that user's default when I try to delete it in the Admin console.

The only thing I can think of is to give user's role both forms, then goto that user & have them change their default form. But, I'd like a simpler & cleaner way to get rid of them out of the DB entirely, without having to goto each user with the wrong default.

T

Vasily Kamenev
Honored Contributor

Re: Deleting unused forms & templates

HI
George is right, I use Blocked and cat. NotUsed.
The other way Archiving, doc sd45_Admin_guide.pdf chapter 11, read before. prepare view where used this old templates doing Achiving, after this item will deleted and you can delete Templetes too.

Vasily
Terry A. Moir
Esteemed Contributor

Re: Deleting unused forms & templates

Understood. But, templates have never been used, so no records exist using the templates. Users, however, have the templates as their "default" template, even though their role no longer has access to them. Same thing with forms.

While I could change their category & re-name them, I'd prefer to delete them prior to implementing dynamic forms - however if that's not possible except at the db level, guess I'll have to live with it.

T

George M. Meneg
Honored Contributor
Solution

Re: Deleting unused forms & templates

Hello Terry,

You can do it without asking your users but you have to do it at sql level.

The following query will fetch the name and the oid of the default templates per role, entity

select rol.rol_description,ent.ent_name, tem.tem_name, tac.tac_tem_oid
from rep_roles rol, rep_templates tem, rep_template_access tac, ifc_entities ent
where tac.tac_defaulttemplate=1
and tac.tac_tem_oid=tem.tem_oid
and tac.tac_rol_oid=rol.rol_oid
and ent.ent_oid=tem.tem_ent_oid
order by rol_description asc

In the same query the template oid is also listed. You must then alter the table rep_template_access and set tac_defaulttemplate=0 where the oid of the template is the one you want to get rid!

You must do about the same for forms (but you have to modify the table REP_FORM_ACCESS) etc.

If you don't want to do that on the db level, just login as a user of a role that has a template/form as default. Once the console is opened set another form/template as default.

Then you can delete them from the console where you've logged as administrator.
menes fhtagn
Carlos Thompson
Regular Collector

Re: Deleting unused forms & templates

George.....you are the man! That is a very nice trick to log into each role and do "set as default" through the File Menu to set the new default.

Will this truly swap the default form(s) globally and so I don't have to worry about a SMS/GPO event to remove each local forms.dat?????

I have been banging my head trying to figure out how to swap everyone's default change form to the v2 one!

thx
Carlos
//Add this to "OnDomLoad" event