- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 03:48 AM
The following are the set values:
<Catalog Client Scripts>
Applies to: A Catalog Item
Active: True
UI Type: All
Application: Global
Type: onChange
Applies on a Catalog Item view: True
<Script Include>
Name: KnowledgeAjax
Application: Global
Accessible from: All application scopes
Client callable: True
Active: True
Protection policy: None
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 01:24 AM
The issue is resolved. The ACL for the Client callable script include is not available, so we have to create the ACL with the same name as of Script include then it's working.
Thank for the solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 04:01 AM
Is there any value that you are getting with code? did you tried using logging what is the value you are getting now?
If possible send me the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 04:02 AM
can you add logs and alerts to see if the control reached the script include or not?
And whether or not you get a response back?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 04:05 AM
The script include is not calling. All the alerts are coming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 04:06 AM
Can you show the full script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 04:11 AM
var KnowledgeAjax = Class.create();
KnowledgeAjax.prototype = Object.extendsObject(KnowledgeAjaxSNC, {
getRequestTypeOptions: function() {
var options = {};
if (gs.getUser().hasRole("service_owner")) {
options.create = true;
} else {
options.create = false;
}
if (gs.getUser().hasRole("service_owner") || this.getManagerAndAdditionalManager) {
gs.info("@#@ Visibility " + getManagerAndAdditionalManager);
options.edit = true;
} else {
gs.info("@#@ Visibility " + getManagerAndAdditionalManager);
options.edit = false;
}
return new JSON().encode(options);
},
getManagerAndAdditionalManager: function() {
//var groups = [];
var currLoginUser = gs.getUserID();
gs.info("@#@ Current user : " + currLoginUser);
var kbGroup = new GlideRecord("sys_user_group");
kbGroup.addEncodedQuery("typeLIKE458de4f067671300dbfdbb2d07415ad6^manager=" + currLoginUser + "^ORu_additional_managerLIKE" + currLoginUser);
kbGroup.query();
gs.info("@#@ Row count for the SI " + kbGroup.getRowCount());
if (kbGroup.getRowCount() >= 1)
return true;
else
return false;
},
type: 'KnowledgeAjax'
});