0% found this document useful (0 votes)
6 views1 page

Script For Lab2

The document contains a script that initializes a new record in the 'cmdb_ci_outage' table for a degradation type outage. It sets various values based on the input parameters and inserts the record, storing the outage record ID and number in the outputs. The script is designed to work with a specific parent table, which is checked to be 'task' before setting the task number.

Uploaded by

kimrubyredmine
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Script For Lab2

The document contains a script that initializes a new record in the 'cmdb_ci_outage' table for a degradation type outage. It sets various values based on the input parameters and inserts the record, storing the outage record ID and number in the outputs. The script is designed to work with a specific parent table, which is checked to be 'task' before setting the task number.

Uploaded by

kimrubyredmine
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

(function execute(inputs, outputs) {

var parentTable = [Link]().getBase([Link]());


var outage = new GlideRecord("cmdb_ci_outage");

[Link]();
//[Link]("cmdb_ci", [Link]);
[Link]("type", "Degradation");
//[Link]("begin", [Link]);
[Link]("short_description", "degradation");
if (parentTable == "task")
[Link]("task_number", [Link]());
[Link] = [Link]();
// Add this line to get the outage number as a string
[Link] = [Link]("number");
})(inputs, outputs);

You might also like