Name

sn_hr_sp.TodosFilterClientUtilSNC

Description

WARNING Customers should NOT modify this script The purpose of this script include is to provide default behaviours for the TodosFilterClientUtil ajax script include. To change the behaviour of these methods (or add new methods), Customers should override/add new methods to the TodosFilterClientUtil ajax script include.

Script

var TodosFilterClientUtilSNC = Class.create();
TodosFilterClientUtilSNC.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {

  isChildFilter: function() {
      var filter = this.getParameter('sysparm_filter');
      var gr = new GlideRecord('sn_hr_sp_todo_filter_m2m_filter');
      gr.addQuery('todo_child_filter', filter);
      gr.setLimit(1);
      gr.query();
      if (gr.hasNext())
          return true;
      return false;
  },

  checkForAssociatedSubFilters: function() {
      var filter = this.getParameter('sysparm_filter');
      var gr = new GlideRecord('sn_hr_sp_todo_filter_m2m_filter');
      gr.addQuery('todo_parent_filter', filter);
      gr.query();
      if (gr.hasNext()) {
          return true;
      }
      return false;
  },

  checkForAssociatedConditions: function() {
      var filter = this.getParameter('sysparm_filter');
      var gr = new GlideRecord('sn_hr_sp_todo_filter_m2m_condition');
      gr.addQuery('todo_filter', filter);
      gr.query();
      if (gr.hasNext()) {
          return true;
      }
      return false;
  },

  type: 'TodosFilterClientUtilSNC'
});

Sys ID

f85609be53aa11105a1eddeeff7b123a

Offical Documentation

Official Docs: