Name

global.PlannedTaskRelation

Description

No description available

Script

var PlannedTaskRelation = Class.create();
PlannedTaskRelation.prototype = {
  initialize: function(gr) {
      this.gr = gr;
  },
  
  getParent: function() {
      gs.print('parent '+this.gr.parent.getRefRecord().getValue('sys_id'));
      return new PlannedTask(this.gr.parent.getRefRecord());
  },
  
  getChild: function() {
      return new PlannedTask(this.gr.child.getRefRecord());
  },
  
  deleteRecord: function(workflow) {
      this.gr.setWorkflow(workflow);
      this.gr.deleteRecord();
  },
  
  record: function() {
      return this.gr;
  },
  
  getValue: function(col) {
      return this.gr.getValue(col);
  },
  
  setProcessFlag: function(flag) {
  	this.gr.setValue('process_flag', flag);
  	this.gr.setWorkflow(false);
  	this.gr.update();
  },
  
  type: 'PlannedTaskRelation'
};

PlannedTaskRelation.get = function(sysId) {
  var gr = new GlideRecord("planned_task_rel_planned_task");
  gr.get(sysId);
  return new PlannedTaskRelation(gr);
};

Sys ID

a95e20e30bc32200acc30e7363673a57

Offical Documentation

Official Docs: