Where is this.newItem()

Priyanka132
Giga Contributor

Hi All,

Where is the funciton this.newItem() defined. I see this being used in several other script includes.

 

find_real_file.png

 

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

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

View solution in original post

5 REPLIES 5

The property has global impact on all contexual searches. Changing it on the incident searcher configuration would be specifically applied on the incident form.