SHARE
TWEET

Untitled

a guest Sep 21st, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var gr = new GlideRecord('x_cdltd_loaner_req_loaner_request');
  2.     var pickUpLeadTime = gs.getProperty('x_cdltd_loaner_req.pickup.leadtime',24) * 60 * 60 * 1000;
  3.    
  4.     var noticeTime = new GlideDateTime();
  5.     noticeTime.add(pickUpLeadTime);
  6.    
  7.     gr.addQuery('state',16);
  8.     gr.addQuery('pick_up_reminder','');
  9.     gr.addQuery('start_date', '<=',noticeTime);
  10.     gr.query();
  11.    
  12.     var rightNow = new GlideDateTime();
  13.    
  14.     while (gr.next()) {
  15.         gr.pick_up_reminder = rightNow;
  16.         gr.update();
  17.         gs.eventQueue('x_cdltd_loaner_req.pickUp',gr,gr.number,gs.getUserName());
  18.     }
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