- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2019 11:43 PM
Hi All,
Where is the funciton this.newItem() defined. I see this being used in several other script includes.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:01 AM
Hello,
It is a method within the AbstractAjaxProcessor script include and is used to create XML entries/nodes that are send as results to the client. This data is further fetched in the client side from the response of glide ajax calls.
newItem: function(name) {
if (!name)
name = "item";
var item = this.getDocument().createElement(name);
this.getRootElement().appendChild(item);
return item;
},
Script include: https://instance_name.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=d65f78c40a0a0b6900196656f35913d3
Replace your instance ame
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:01 AM
Hello,
It is a method within the AbstractAjaxProcessor script include and is used to create XML entries/nodes that are send as results to the client. This data is further fetched in the client side from the response of glide ajax calls.
newItem: function(name) {
if (!name)
name = "item";
var item = this.getDocument().createElement(name);
this.getRootElement().appendChild(item);
return item;
},
Script include: https://instance_name.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=d65f78c40a0a0b6900196656f35913d3
Replace your instance ame
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:31 AM
Hello AK,
Thats great... can you help me to know in which code is the below "s" used.
We have a requirement to prevent the knowledge article from being copied onto the incidents additional comments when "attach to incident" is clicked. I suspect that the additional comments in the incident gets its value from "s" but I am struggling to find which code does it.
So far I have found this community link to be very helpful : https://community.servicenow.com/community?id=community_question&sys_id=cb51c329db98dbc01dcaf3231f9619c3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:47 AM
For this, you can navigate to the Incident Defection searcher under the cxs_table_config table, then navigate to the Search Action Configurations related list and open the entries that are named as Attach. On this record, clear out the value for Attach note field and it should achieve your requirment.
The actual table name is cxs_ui_action_config

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:49 AM
Hi Priyanka,
There is a system property named glide.knowman.attach.fields which will determine in which field the details of attachment to be shown.
If you check this system property, you will see comments field is being present as default becuase of which you see the details filled in Additional comments once you click on Attach.
Mark the comment as a correct answer and helpfull if it helps.