- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 08:34 AM
In my PDI script Include is not running, while i verified in background script the code is working fine, Created script include and added script include in on change client script, the script include itself not working in my PDI, may i know the reason behind this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:28 AM
@sarika ponnagan Try this
var Ifuserismanager = Class.create();
Ifuserismanager.prototype = Object.extendsObject(AbstractAjaxProcessor, {
isUserManager: function() {
gs.log("checking the manager");
var userId = this.getParameter('sysparm_user_sys_id');
var grReportee = new GlideRecord('sys_user');
grReportee.addQuery('manager', userId);
grReportee.setLimit(1);
grReportee.query();
if (grReportee.next()) {
gs.log("user is manager");
return true;
}
gs.log("user is not a manager");
return false;
},
type: 'Ifuserismanager'
});
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:04 AM
@sarika ponnagan Can you help with error snapshot? Let us know exactly where you stuck
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:10 AM
I am not getting any error, i added the log after the calling function its showing in logs, but here its not going to the loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:28 AM
@sarika ponnagan Try this
var Ifuserismanager = Class.create();
Ifuserismanager.prototype = Object.extendsObject(AbstractAjaxProcessor, {
isUserManager: function() {
gs.log("checking the manager");
var userId = this.getParameter('sysparm_user_sys_id');
var grReportee = new GlideRecord('sys_user');
grReportee.addQuery('manager', userId);
grReportee.setLimit(1);
grReportee.query();
if (grReportee.next()) {
gs.log("user is manager");
return true;
}
gs.log("user is not a manager");
return false;
},
type: 'Ifuserismanager'
});
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:40 AM
Now its not triggering the catalog client script,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 09:41 AM
Getting below error