Name

global.TemplateUtil

Description

Utility functions for Templates var tu = new TemplateUtil(); tu.

Script

var TemplateUtil = Class.create();
TemplateUtil.prototype = {
  initialize: function(){
  },
  
  getApplicable: function(table) {
      var t =  new GlideTemplate();
      var gr = t.getApplicable(table);
      return gr;
  },

  apply: function(name, gr) {
      var t =  new GlideTemplate().getByName(name, gr.getTableName(), true);
      if (t != null)
          t.apply(gr);

      return gr;
  },
  
  type: "TemplateUtil"
}


Sys ID

166853320f130000b12e6903cfe0129d

Offical Documentation

Official Docs: