Name
global.DbVideoNameCheck
Description
Receives a parameter name and determine whether a db_video record exists with the same name.
Script
var DbVideoNameCheck = Class.create();
DbVideoNameCheck.prototype = Object.extendsObject(AbstractAjaxProcessor, {
process: function() {
var name = this.getName();
var gr = new GlideRecord('db_video');
gr.addQuery('name', name);
gr.query();
var exists = "false";
if (gr.next())
exists = "true";
var item = this.newItem("match");
item.setAttribute("exists", exists);
},
type: "DbVideoNameCheck"
});
Sys ID
be5b84a00a0a0ba94c63cc120263bbd6