Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
How often you come across cases where 'Private Task' needs to be disabled from the interceptor that shows up when New button is clicked on the Task table only for handful of users (users who are ITIL users but from XYZ department). This can be controlled by creating a 'Query' Business Rule on Answer (sys_wizard_answer) table. Script will be used in Business Rule to achieve the same.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a bit clearer? The intend of the script is to be used in a Query Business Rule on the Answer table?
Can you share why Private tasks would need to be disabled? That will help others determine if this will also be needed in their instance/situation.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(function executeRule(current, previous /*null when async*/ ) {

var usr = gs.getUserID();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable


var userDept = (gs.getUser().getRecord().getValue('department'));//check for logged in user department
if (userDept != 'XYZ') { //is not XYZ. replace XYZ with relevant sys_id
current.addQuery('name', '!=', 'Private Task'); //This will remove Private Task from interceptor for all users with department other than XYZ
}

})(current, previous);
Loading