Remove the ability to raise standard change not from a template

arthikamugundan
Kilo Expert

Hello,

I have a requirement where I should have to remove the ability to fill new fields every time we create a std change record, Instead we're required to make choosing the template for std change as mandatory.

The solution I proposed was to make the fields read-only for the user on submitting the std change and prompting them to select from the template since it is a std change.

I would like to invite new ideas to this requirement so that I could learn the best possible solution for the same.

Thanks for reading,

Arthika N

6 REPLIES 6

Hi Pooja,



It was very difficult for us to mandate the users for selecting the templates only for the standard changes.



So after a lot of discussion, we completely removed the standard templates and implemented copy change records (standard alone).


Wherein the base standard records can be created only by the Change Analyst ( Hide the Standard choices for the others using a client script). The others can only make a clone of the record from the specific module.



Useful thread:


https://community.servicenow.com/message/696381#696381



Hope this helps.



Thanks,


Arthika N


pooja33
Kilo Explorer

Hi,



We achived this requirement by creating a new field called "Template" which was reference to 'Template' table and mandated it when ever some one selects type as standard.


Write a Client Script to apply selected template


Name: u_Apply Template


Type: onChange


Field Name: Template


Script :


function onChange(control, oldValue, newValue, isLoading, isTemplate) {


  if (isLoading || newValue == '') {


  return;


  }


  if(g_form.getValue('type') == 'Routine') {


  applyTemplate(g_form.getValue('u_template'));


  }


}



//The applyTemplate works the same way as that of Apply Template option avai;able at right click on Header -> Templates -> Apply Template.