- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 03:12 PM
Hi all,
I have a script include that is being called from a client script that logs a message so that we know when a public user that is not logged in accesses a form. It logs the message fine when I am logged in however when in an incognito window it does not log the message. The rest of the form functions just fine in this public state.
Here is the client script:
var log = new GlideAjax("scope.log_message");
log.addParam('sysparm_name', 'log');
log.addParam('sysparm_msg', message);
log.getXML(callback);
function callback(response) {
}
Here is the script include:
var log_message = Class.create();
log_message.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
log: function() {
gs.info(this.getParameter("sysparm_msg"));
},
type: 'log_message'
});
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 03:30 PM
For a public page you will need to set the privacy on your script include to be public as well, otherwise it will not execute for non-logged in users.
Privacy settings
The privacy setting for a client-callable script-include can be public or private. Most client-callable script-includes are marked private by default.
The private privacy-setting means that guests who access public pages cannot access the client-callable script-include. A private script cannot be executed by a non-logged-in user.
A public privacy-setting means that the client script can be executed by non-logged-in users that create an appropriate HTTP request. This can create a security problem if the client script provides confidential information.
Change privacy on a single client callable script include
Change the privacy setting for a single client-callable script include by adding the isPublic() function.
The isPublic() setting takes precedence over the glide.script.ccsi.ispublic property. For example, if the property is set to false, making all client-callable script-includes private, and a script sets isPublic() to true, the script is public.
To change the privacy for a single client-callable script include, add the following method to the script include:
isPublic:function(){return[true/false];},
Example
var NewInclude =Class.create(); NewInclude.prototype={ initialize:function(){}, myFunction:function(){//Put function code here}, isPublic:function(){return false;}, type:'NewInclude'};
I hope this helps!
If this was helpful or correct, please be kind and remember to click appropriately!
Michael Jones - Proud member of the GlideFast Consulting team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2021 03:30 PM
For a public page you will need to set the privacy on your script include to be public as well, otherwise it will not execute for non-logged in users.
Privacy settings
The privacy setting for a client-callable script-include can be public or private. Most client-callable script-includes are marked private by default.
The private privacy-setting means that guests who access public pages cannot access the client-callable script-include. A private script cannot be executed by a non-logged-in user.
A public privacy-setting means that the client script can be executed by non-logged-in users that create an appropriate HTTP request. This can create a security problem if the client script provides confidential information.
Change privacy on a single client callable script include
Change the privacy setting for a single client-callable script include by adding the isPublic() function.
The isPublic() setting takes precedence over the glide.script.ccsi.ispublic property. For example, if the property is set to false, making all client-callable script-includes private, and a script sets isPublic() to true, the script is public.
To change the privacy for a single client-callable script include, add the following method to the script include:
isPublic:function(){return[true/false];},
Example
var NewInclude =Class.create(); NewInclude.prototype={ initialize:function(){}, myFunction:function(){//Put function code here}, isPublic:function(){return false;}, type:'NewInclude'};
I hope this helps!
If this was helpful or correct, please be kind and remember to click appropriately!
Michael Jones - Proud member of the GlideFast Consulting team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2021 05:46 AM
Thank you this was exactly what I needed