Notifications

94 views

Description

Symptoms


When creating a record, it is possible to use sysparm_query in the URL to set values to fields.  For example, if I want to create an incident with a Short Description of "Troubleshooting Request", I would use the following URL:

incident.do?sys_id=-1&sysparm_query=short_description=Troubleshooting Request
 
Connect Chat and the Copy Change UI Action both generate a URL with sysparm_query to populate fields.

Cause


If you're having issues, there are two common reasons:
 
1.  The field has the 'ignore_filter_on_new=true' dictionary attribute.
2.  There is a sys_template record where the 'name' and 'table' are the affected table, i.e. 'Incident'.

Resolution


1.  The field has the 'ignore_filter_on_new=true' dictionary attribute.
 
Certain fields have this attribute out-of-box.  For example, 'number', which is meant to be autogenerated.  Remove the attribute (or understand that it is expected behavior).
 
2.  There is a sys_template record where the 'name' and 'table' are the affected table, i.e. 'Incident'.
 
It is possible to make a sys_template record apply automatically.  To do this, you create a template where the 'name' is the same as the 'table'.  This will overwrite the sys_query values with whatever is in the template.
 
Resolution is to delete the template (or understand that it is expected behavior).
 
Note that the 'Global' and 'User' fields do not matter for these templates.
 

Additional Information


Troubleshooting questions:
- Does it happen for one field or all fields?  If one field, it is likely the dictionary attribute.
- Does it happen for a specific table?  If so, check the sys_template records for a record where 'name' and 'table' are the affected table.  

Article Information

Last Updated:2019-08-02 21:16:20
Published:2018-05-29