How can we quickly apply a template at the creation of an incident by the url ?

renaudr
Kilo Explorer

Hi,

I'd like to create links to create incidents and automatically apply a template just by passing the template id in params of my url.

Something like this :

https://<....>.service-now.com/incident.do?sys_template_id=6e3389196ff28********

It would be similar to a click on a service catalog, but it will be more flexible to create and manage.

Is it possible easily in service now ?

Best Regards

1 ACCEPTED SOLUTION

aliciaamber
Giga Contributor

Hi there,



I think this link could help you http://wiki.servicenow.com/index.php?title=Creating_a_Template_for_Change_Request_Tasks#gsc.tab=0



Add a new module to the Change Management application to create a new change request that uses the templates.  


  1. Right-click the Change application and select Edit Application Menu.  
  2. Click New in the Modules related list.
    A UI policy for New Record type modules removes the Arguments field from the form. To use the templates, it is necessary to construct a URL that references the templates.  
  3. Give the module a name.
  4. Select the [change_request] table.
  5. Select URL (from arguments) for the link type.
  6. Enter the following in the Arguments field, but replace the link with the name of the appropriate master template.
change_request.do?sys_id=-1&sysparm_template=New Server
 


A module that uses the template to create a new change request.


Using the module will create a new record, populated with the template as shown in this screenshot:


 


A new Change Request record using the template.




Good luck



Alicia


View solution in original post

3 REPLIES 3

aliciaamber
Giga Contributor

Hi there,



I think this link could help you http://wiki.servicenow.com/index.php?title=Creating_a_Template_for_Change_Request_Tasks#gsc.tab=0



Add a new module to the Change Management application to create a new change request that uses the templates.  


  1. Right-click the Change application and select Edit Application Menu.  
  2. Click New in the Modules related list.
    A UI policy for New Record type modules removes the Arguments field from the form. To use the templates, it is necessary to construct a URL that references the templates.  
  3. Give the module a name.
  4. Select the [change_request] table.
  5. Select URL (from arguments) for the link type.
  6. Enter the following in the Arguments field, but replace the link with the name of the appropriate master template.
change_request.do?sys_id=-1&sysparm_template=New Server
 


A module that uses the template to create a new change request.


Using the module will create a new record, populated with the template as shown in this screenshot:


 


A new Change Request record using the template.




Good luck



Alicia


Thank you very much it works fine with sysparm_template


jkc
Giga Expert

Is it not a problem that the template is choosen based on the name? I can easily imagine name-duplicates for templates.



Is it possible to edit the url to take the sys_id of the template instead?