How to edit Standard Change Templates?

Mussie
ServiceNow Employee
ServiceNow Employee

Hi Guys,

I am unable to edit standard change templates directly. I tried tweaking the ACL's on the below tables to no available?

- std_change_template

- std_change_record_producer

Any idea how I can edit the records without going the edition process (i.e. Modify template UI action)?

https://dev*****.service-now.com/nav_to.do?uri=std_change_record_producer.do?sys_id=92b8544047810200e90d87e8dee490b0

find_real_file.png

Regards,

Mussie

11 REPLIES 11

Mussie
ServiceNow Employee
ServiceNow Employee

Nope, this isn't working for me. Can you test it on your instance?

Mussie

I did. Except the formatter everything else work. The UI macro is ServiceNow Proprietary.

 

find_real_file.png


Please mark this response as correct or helpful if it assisted you with your question.

Mussie
ServiceNow Employee
ServiceNow Employee

Thanks for checking that, is there a way I can edit the formatter? That is the end result I am looking for.

Mussie

So after a lot of research, I was able to modify it. 

 

find_real_file.png

 

The first thing you need to do is open  table 'std_change_proposal' and open the record for the Decommission Local Office........ Change the state of that record to In Progress and the Variable Editor becomes editable. Update the variable as required. Once that is done, you can mark it closed again. Copy the sysid

Next table is the std_change_template where the actual templates are stored. Open the Write ACL for this table and make it Admin Override. This mayn't be required to run the below script. I would suggest, run the below script and if it doesn't work, update the ACL with Admin override. Copy the sys_id of the corresponding template record.

 

Then go to the background script and run this script

 

var templateId = '9ab8544047810200e90d87e8dee490af'; // sys_id of the template record
var proposalSysId = 'af47d04047810200e90d87e8dee490fc'; //sys_id of the proposal record
var stdChgProposalGR = new GlideRecord('std_change_proposal');

if (stdChgProposalGR.get(proposalSysId)) {
var templateGr = new GlideRecord('std_change_template');
if(templateGr.get(templateId)) {
//templateGr.name = stdChgProposalGR.template_name;
templateGr.template = stdChgProposalGR.template_value;
//templateGr.short_description = stdChgProposalGR.short_description;
templateGr.update();
}
}

 

Once this is done, when you go to All templates and open your corresponding template, it will have the new values.

All this should be done on DEV. Then you can export the xml of template record and put it to UAT. If it works, you are good to import it to Production.

 

 


Please mark this response as correct or helpful if it assisted you with your question.

Mussie
ServiceNow Employee
ServiceNow Employee

Thanks for your detailed response, however this is a bit lengthy and complicated to use it in customer instances. I decided to go with exporting the values as xml and edit the state and import them back into the std_change_template table.

Mussie