daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Dec 14th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var GATask3 = Class.create();
  2. GATask3.prototype = Object.extendsObject(AbstractAjaxProcessor, {
  3.     myFunc : function (businessService) {
  4.         var ids = 'sys_id=';
  5.                
  6.         var gr = new GlideRecord('incident');
  7.         gr.addQuery('priority', '1');
  8.         gr.addQuery('business_service', businessService);
  9.         gr.query();
  10.        
  11.         while (gr.next()) {                        
  12.             ids += gr.getValue('sys_id') + '^ORsys_id=';           
  13.         }
  14.        
  15.         ids = ids.slice(0, -10);
  16.         gs.log(ids);
  17.         return ids;
  18.     },
  19.    
  20.     myFunc2 : function () {
  21.         var BS = this.getParameter("BS");
  22.         var arrIds = [];
  23.                
  24.         var gr = new GlideRecord('incident');
  25.         gr.addQuery('priority', '1');
  26.         gr.addQuery('business_service', BS);
  27.         gr.query();
  28.        
  29.         while (gr.next()) {                        
  30.             arrIds.push(gr.getValue('sys_id'));
  31.         }
  32.        
  33.         arrIds = arrIds.toString();
  34.         gs.log('The array from myFunc2 is: ' + arrIds, 'Stanimir');
  35.         return arrIds;
  36.     }
  37. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top