Hi! I am your UI assistant, I can perform web tasks for you. What can I help you with?

Create a new change request with a value of "A failed RAID controller card needs to be replaced on PSORA1" for field "Short description", a value of "Network" for field "Category", a value of "01:00.0 RAID bus controller: Adaptec AAC-RAID has failed on PSORA1 and needs to be replaced immediately." for field "Description", a value of "Moderate" for field "Risk", a value of "osmazomatic unlonely octuplex spermatocele operator" for field "Justification", a value of "Successful with issues" for field "Close code", a value of "handicap platanaceous shaper calmer subreport" for field "Test plan", a value of "Fail PSORA1 to DR systemShutdown SystemRemove failed RAID cardInstall new RAID cardBoot systemConfigure RAID cardBring system onlineValidate access to disk structuresFailback from DR to PSORA1" for field "Implementation plan", and a value of "" for field "Service".

       try {
		  window.__initialRoutePayload = JSON.parse('{\n  \x22context\x22 : {\n    \x22experienceName\x22 : \x22Unified Navigation App\x22,\n    \x22path\x22 : \x22now\/nav\/ui\x22\n  },\n  \x22fields\x22 : { },\n  \x22params\x22 : {\n    \x22target\x22 : \x22change_request.do\x22\n  },\n  \x22route\x22 : \x22classic\x22\n}');
       } catch(e) { window.__initialRoutePayload = {} }
       if (window && (window != window.top) && (frameElement && frameElement.id != 'testFrame')) {
			if (!window.top.frameBusterRouteChangeWithoutRedirect || !window.top.frameBusterRouteChangeWithoutRedirect(window.__initialRoutePayload))
 				window.top.location.href = window.location.href; 
		}
	
		html, body { height: 100%; margin: 0; padding: 0; }
		body { font-family: "Source Sans Pro", "Helvetica Neue", Arial; font-size: 13px; line-height: 1.42857; background-color: #fff;}
       .sn-tooltip{-webkit-box-align:center; -ms-flex-align:center; align-items:center; background-color:rgba(0,0,0,.8);            border-radius:2px; color:rgba(255,255,255,1); display:-webkit-inline-box; display:-ms-inline-flexbox; display:inline-flex;           font:12px "Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif; height:auto; -webkit-box-pack:center;  -ms-flex-pack:center;           justify-content:center;	max-width:320px; padding:8px;	text-align:center; z-index:1070; position:absolute;	visibility:hidden;           white-space:normal; left:0;	top:0 }
	
 window.addEventListener('DOMContentLoaded', function() { 
  const SERVICE_WORKER_MANAGER_CONFIG = {disabled:false, serviceWorkers:[{"scope":"/","serviceWorkerUrl":"/uxsw/scope/root.js?uxpcb=1737451790054"}]}; 
  const servedHttp2 = window.localStorage.getItem('servedHttp2');
  const servingHttp2 = false;
  if (servedHttp2 === 'false' && servingHttp2 && window.serviceWorkerManager) window.serviceWorkerManager.update();
  window.localStorage.setItem('servedHttp2', servingHttp2);
  if (window.serviceWorkerManager) window.serviceWorkerManager.init(SERVICE_WORKER_MANAGER_CONFIG); 
  navigator.serviceWorker && navigator.serviceWorker.ready.then(registration => registration.active.postMessage({
    action: 'setConfig',
    isUpgrading: false,
    enabledSourceMaps: false,
    disableCacheCleanTask: false,
  }));
 });

.hide-live-region {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	margin: 0;
	border: none;
	padding: 0;
	white-space: nowrap;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
}

{
  "features": {
    "record": {
      "_default": {
        "experiencePriorityList": [
        ]
      }
    },
    "list": {
          {
            "name": "Polaris App",
            "sysId": "a84adaf4c700201072b211d4d8c260b7"
          }
        ]
      }
    },
    "search": {
          {
          }
        ]
      }
    },
    "inbox":{
          {
            "name": "Service Operations Workspace",
            "sysId": "aa881cad73c4301045216238edf6a716"
          },
          {
            "name": "CSM/FSM Configurable Workspace",
            "sysId": "c4e321a3530210102c30ddeeff7b12f6"
          }
        ]
      }
    }
  }
}

M9.5 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zM8 14a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z

M7.049 2.359c.3-.921 1.603-.921 1.902 0l1.183 3.64h3.827c.969 0 1.372 1.24.588 1.81l-3.096 2.249 1.182 3.64c.3.921-.755 1.687-1.539 1.118L8 12.566l-3.096 2.25c-.784.57-1.839-.197-1.54-1.118l1.183-3.64-3.096-2.25C.667 7.238 1.071 6 2.039 6h3.827L7.05 2.36zm.95.309L6.594 6.999H2.039l3.684 2.677-1.407 4.33L8 11.33l3.684 2.677-1.407-4.331 3.684-2.677H9.407L8 2.668z

M10.727 10.02a5.5 5.5 0 1 0-.707.707l4.127 4.127a.5.5 0 1 0 .707-.707l-4.127-4.127zM11 6.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0z

M12.5 5a.5.5 0 0 1 .372.834l-4.5 5a.5.5 0 0 1-.744 0l-4.5-5A.5.5 0 0 1 3.5 5h9z

M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0zM7.397 2.347C7.64 2.08 7.844 2 8 2c.156 0 .36.08.603.347.243.267.485.682.698 1.236.159.414.297.89.407 1.417H6.292c.11-.527.248-1.003.407-1.417.213-.554.455-.969.698-1.236zM5.272 5a10.53 10.53 0 0 1 .494-1.776 6.18 6.18 0 0 1 .457-.957A6.016 6.016 0 0 0 2.803 5h2.47zm-2.93 1h2.775A16.827 16.827 0 0 0 5 8c0 .693.04 1.365.117 2H2.34A5.99 5.99 0 0 1 2 8c0-.701.12-1.374.341-2zm.46 5a6.016 6.016 0 0 0 3.421 2.733 6.179 6.179 0 0 1-.457-.957A10.53 10.53 0 0 1 5.272 11h-2.47zm3.49 0a9.26 9.26 0 0 0 .407 1.417c.213.554.455.969.698 1.236.243.267.447.347.603.347.156 0 .36-.08.603-.347.243-.267.485-.682.698-1.236A9.26 9.26 0 0 0 9.708 11H6.292zm4.436 0a10.523 10.523 0 0 1-.494 1.776 6.155 6.155 0 0 1-.457.957A6.016 6.016 0 0 0 13.197 11h-2.47zm2.93-1h-2.775c.076-.635.117-1.307.117-2 0-.693-.04-1.365-.117-2h2.776A5.99 5.99 0 0 1 14 8a5.99 5.99 0 0 1-.341 2zm-.46-5a6.016 6.016 0 0 0-3.421-2.733c.17.285.323.608.457.957.201.522.368 1.12.494 1.776h2.47zM9.874 6c.08.625.125 1.297.125 2 0 .703-.044 1.375-.125 2h-3.75A15.731 15.731 0 0 1 6 8c0-.703.044-1.375.125-2h3.75z

M5.5 2C3.08 2 1 3.73 1 6c0 .961.38 1.835 1 2.516V10.5a.5.5 0 0 0 .82.384l1.293-1.077a5.02 5.02 0 0 0 2.016.154C6.618 11.74 8.435 13 10.5 13c.483 0 .95-.068 1.387-.193l1.293 1.077A.5.5 0 0 0 14 13.5v-1.984c.62-.68 1-1.555 1-2.516 0-2.27-2.08-4-4.5-4a4.84 4.84 0 0 0-.629.04C9.382 3.26 7.565 2 5.5 2zM2 6c0-1.596 1.502-3 3.5-3S9 4.404 9 6 7.498 9 5.5 9c-.472 0-.921-.08-1.33-.225a.5.5 0 0 0-.486.088L3 9.433V8.314a.5.5 0 0 0-.148-.355C2.314 7.426 2 6.74 2 6zm8 .03c-.014 1.73-1.236 3.141-2.892 3.705C7.486 11.004 8.818 12 10.5 12c.473 0 .921-.08 1.33-.225a.5.5 0 0 1 .486.088l.684.57v-1.118a.5.5 0 0 1 .148-.355C13.686 10.426 14 9.74 14 9c0-1.596-1.502-3-3.5-3-.17 0-.337.01-.5.03z

contextual-zone-button polaris-enabled help-button is-placeholder

M7.5 4C6.658 4 6 4.606 6 5.5a.5.5 0 0 1-1 0C5 4.027 6.132 3 7.5 3 8.913 3 10 4.216 10 5.643c0 .489-.126.913-.377 1.257a2.028 2.028 0 0 1-.97.703C8.22 7.76 8 8.043 8 8.286V8.5a.5.5 0 0 1-1 0v-.214c0-.862.708-1.405 1.313-1.624.23-.083.394-.203.502-.35.107-.147.185-.357.185-.67C9 4.703 8.296 4 7.5 4zm0 7a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z

M0 7.5a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0zM7.5 14a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13z

polaris-contextual-menu helpMenu undrilled can-be-pinned polaris-enabled keyboard-navigatable can-animate

m7.12 5.131.423.424-1.24 1.241a4.705 4.705 0 0 0-1.552-.262c-1.006 0-1.77.384-2.399.847-.772.57-.75 1.634-.153 2.232l1.74 1.74-1.793 1.793a.5.5 0 0 0 .708.708l1.792-1.793 1.736 1.735c.6.6 1.668.619 2.236-.158.456-.623.844-1.39.844-2.392 0-.542-.091-1.064-.261-1.551l1.241-1.241.424.424a1.5 1.5 0 0 0 2.121 0l.778-.778a1.5 1.5 0 0 0 0-2.121l-3.747-3.747a1.5 1.5 0 0 0-2.121 0l-.778.778a1.5 1.5 0 0 0 0 2.121zm1.484.778a.5.5 0 0 0 0-.708l-.777-.777a.5.5 0 0 1 0-.707l.777-.778a.5.5 0 0 1 .707 0l3.746 3.747a.5.5 0 0 1 0 .707l-.777.778a.5.5 0 0 1-.707 0l-.777-.778a.5.5 0 0 0-.707 0L8.275 9.206a.548.548 0 0 0-.102.602 3.7 3.7 0 0 1 .288 1.438c0 .717-.27 1.28-.652 1.802a.475.475 0 0 1-.721.041L2.906 8.906a.475.475 0 0 1 .04-.72c.521-.384 1.081-.652 1.805-.652a3.7 3.7 0 0 1 1.439.29.548.548 0 0 0 .601-.103L8.604 5.91z

M9 2.5A1.5 1.5 0 0 1 10.5 1c.639 0 1.253.366 1.441 1h.559A1.5 1.5 0 0 1 14 3.5v9a1.5 1.5 0 0 1-1.5 1.5h-10A1.5 1.5 0 0 1 1 12.5v-9A1.5 1.5 0 0 1 2.5 2h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5H12v6.5a.5.5 0 0 1-.053.224l-1 2a.5.5 0 0 1-.895 0l-1-2A.5.5 0 0 1 9 9.498l.002-7zm1.5-.5a.5.5 0 0 0-.5.5v6.88l.5 1 .5-1V2.416c0-.22-.163-.415-.5-.415zM3 5.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5z

contextual-zone-button polaris-enabled experience-notifications is-placeholder

M8 2a5 5 0 0 0-5 5v2.085A1.5 1.5 0 0 0 3.5 12H6a2 2 0 1 0 4 0h2.5a1.5 1.5 0 0 0 .5-2.915V7a5 5 0 0 0-5-5zM4 7a4 4 0 1 1 8 0v2.5a.5.5 0 0 0 .5.5.5.5 0 0 1 0 1h-9a.5.5 0 0 1 0-1 .5.5 0 0 0 .5-.5V7zm5 5a1 1 0 1 1-2 0h2z

M2 6.5C2 8.98529 4.01471 11 6.5 11C8.98529 11 11 8.98529 11 6.5C11 4.01471 8.98529 2 6.5 2C4.01471 2 2 4.01471 2 6.5Z

M6.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zm1.354-3.646a.5.5 0 1 0-.708-.708L6 6.793l-.396-.397a.5.5 0 1 0-.708.708l.75.75a.5.5 0 0 0 .708 0l1.5-1.5z

M18.533 3.846a.481.481 0 0 0-.047-.731A10.95 10.95 0 0 0 12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11c0-2.156-.62-4.167-1.692-5.865a.48.48 0 0 0-.748-.073l-1.466 1.465a.522.522 0 0 0-.08.621 8 8 0 1 1-2.579-2.808c.206.139.484.12.66-.056l1.438-1.438z

grid-template-columns: 100%; grid-template-rows: auto; display: grid;

height: 100%; grid-template: "main" minmax(400px, auto) / 1fr; gap: 1rem;

M18.293 4.293a1 1 0 1 1 1.414 1.414L13.414 12l6.293 6.293a1 1 0 0 1-1.414 1.414L12 13.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L10.586 12 4.293 5.707a1 1 0 0 1 1.414-1.414L12 10.586l6.293-6.293z

section_header_html_no_scroll ltr ng-non-bindable date-calendar tabbed ng-scope

document.addEventListener('click', function (event) {
				CustomEvent.fireAll('body_clicked', event);
			});
			document.hasBodyClickedTrigger = 'true';

	window.NOW = window.NOW || {};
	var g_loadTime = new Date();
	var lastActivity = new Date();
	var g_lang = 'en';
	var g_system_lang = 'en';
	var g_enhanced_activated = 'true';
	  var g_popup_timeout = parseInt(100);
	var g_export_warn_threshold = parseInt(10000);
	  var g_event_handler_ids = {};
	var g_event_handlers = [];
	var g_event_handlers_onLoad = [];
	var g_event_handlers_onSubmit = [];
	var g_event_handlers_onChange = [];
	var g_event_handlers_onCellEdit = {};
	var g_event_handlers_localCache = {};
	var g_event_handlers_queryTracking = true;
	var g_user_date_time_format = "yyyy-MM-dd HH:mm:ss";
	var g_user_date_format = "yyyy-MM-dd";
	var g_user_decimal_separator = ".";
	var g_user_grouping_separator = ",";
	var g_glide_list_separator = ", ";
	var g_allow_field_dependency_for_templates = ("true" === "true");
	var g_tz_offset = -28800000;
	  var g_tz_user_offset = true;
	var g_first_day_of_week = parseInt(1, 10);
	var g_date_picker_first_day_of_week = parseInt(0, 10);
	  var g_full_calendar_edit = true;
	var g_submitted = false;
	var g_max_table_length = 80;
	var g_fontSizePreference = "";
	var g_fontSize = "10pt";
	// use to be the sys_property glide.ui.js_error_notify, hard coded for PRB603998
	var g_jsErrorNotify = "true";
	var g_cancelPreviousTransaction = true;
	var g_text_direction = "ltr";
	var g_glide_list_filter_max_length =  parseInt("0", 10);
	var g_accessibility = false;
	var g_accessibility_tooltips = false;
	var g_accessibility_tooltip_duration = parseInt("10", 10);
	var g_accessibility_visual_patterns = false;
	var g_accessibility_screen_reader_table = false;
	var g_accessibility_date_format = false;
	var g_detail_row = false;
	var g_builddate = "11-26-2024_1946";
	// default values to be used in absence of user preferences are hard coded below
	// as well as in keyboardShortcuts.js and keyboard_preference_changer.xml
	window.g_keyboard_shortcuts = {};
	window.g_keyboard_shortcuts.allow_in_input_fields = false;
	window.g_keyboard_shortcuts.enabled = true;
	window.g_keyboard_shortcuts.global_search = {};
	window.g_keyboard_shortcuts.global_search.enabled = true;
	window.g_keyboard_shortcuts.global_search.key_combination = 'ctrl+alt+g';
	window.g_keyboard_shortcuts.main_frame = {};
	window.g_keyboard_shortcuts.main_frame.enabled = true;
	window.g_keyboard_shortcuts.main_frame.key_combination = 'ctrl+alt+p';
	window.g_keyboard_shortcuts.navigator_toggle = {};
	window.g_keyboard_shortcuts.navigator_toggle.enabled = true;
	window.g_keyboard_shortcuts.navigator_toggle.key_combination = 'ctrl+alt+c';
	window.g_keyboard_shortcuts.navigator_filter = {};
	window.g_keyboard_shortcuts.navigator_filter.enabled = true;
	window.g_keyboard_shortcuts.navigator_filter.key_combination = 'ctrl+alt+f';
	window.g_keyboard_shortcuts.impersonator = {}
	window.g_keyboard_shortcuts.impersonator.enabled = true;
	window.g_keyboard_shortcuts.impersonator.key_combination = 'ctrl+alt+i';
	// The `g_concourse_onmessage_enforce_same_origin` and `g_concourse_onmessage_enforce_same_origin_whitelist` variables
    // do not appear to be used anywhere other than the CustomEventManager, but leaving these for backwards compatability
	var g_concourse_onmessage_enforce_same_origin = 'true'.toLowerCase() === 'true';
	var g_concourse_onmessage_enforce_same_origin_whitelist = '';
	window.g_load_functions = [];
	window.g_render_functions = [];
	window.g_late_load_functions = [];
	window.g_tiny_url = {};
	window.g_tiny_url.use_tiny = 'true' === 'true';
	window.g_tiny_url.min_length = parseInt('1024');
	
	var g_ck = '271822c1539f12104d8731f0a0490e402b5821db002250cc0f090c2982cf70a9abb62fd0';
	
	var g_acWaitTime = parseInt(250);
	
	var g_autoRequest = '';

	try {
		window.NOW.dateFormat = JSON.parse("{\"timeAgo\": false, \"dateBoth\": false}");
	} catch (e) {
		window.NOW.dateFormat = {timeAgo: false, dateBoth: false};
	}

	window.NOW.dateFormat.dateStringFormat = "yyyy-MM-dd";
	window.NOW.dateFormat.timeStringFormat = "HH:mm:ss";
	window.NOW.shortDateFormat = false;
	window.NOW.listTableWrap = true;
	window.NOW.compact = false;
  	window.NOW.templateToggle = false;
	window.NOW.tabbed = true;
	window.NOW.permalink = true;
	window.NOW.useSimpleStorage = true;
	window.NOW.httpRequestCompressionThreshold = 40000;
	window.NOW.httpRequestCompressionLevel = -1;
	window.NOW.httpRequestCompressionMemoryLevel = -1;
	window.NOW.httpRequestCompressionExcludeUrls = 'xmlhttp.do'.split(',');
	window.NOW.deferAmbConnection = false;
	window.NOW.deferredAmbConnectionTimeout = 10000;
	window.NOW.simpleStorageSynch = "67db3330531312104d8731f0a0490e77";
	window.NOW.language =  'en';
	window.NOW.listOpenInAppTab = false;
	window.NOW.floatingScrollbars = 'false'.toLowerCase() === 'true';
	
	window.NOW.user = {};
	window.NOW.user.preferences = [];
	window.NOW.user.roles = 'platform_ml_create,import_transformer,taxonomy_admin,ais_admin,catalog_builder_editor,nlu_admin,catalog,catalog_template_editor,catalog_lookup_admin,admin,ml_admin,platform_ml_read,platform_ml_write,chat_admin,search_application_admin,search_relevancy_model_admin,import_set_loader,catalog_admin,sn_ace.ace_user,import_scheduler,pa_viewer,nlu_editor,sn_templated_snip.template_snippet_admin,sn_hr_sp.esc_admin,nlu_user,personalize_dictionary,live_feed_admin,sn_hr_sp.admin,sn_templated_snip.template_snippet_writer,evam_admin,ml_labeler,sp_admin,import_admin,pa_data_collector,announcement_admin,sn_templated_snip.template_snippet_reader,user_criteria_admin,image_admin,sn_employee.admin,sn_nlu_workbench.nlu_feedback_admin';
	window.NOW.user.allRoles = 'platform_ml_create,import_transformer,taxonomy_admin,ais_admin,catalog_builder_editor,nlu_admin,catalog,catalog_template_editor,catalog_lookup_admin,admin,ml_admin,platform_ml_read,platform_ml_write,chat_admin,search_application_admin,search_relevancy_model_admin,import_set_loader,catalog_admin,sn_ace.ace_user,import_scheduler,pa_viewer,nlu_editor,sn_templated_snip.template_snippet_admin,sn_hr_sp.esc_admin,nlu_user,personalize_dictionary,live_feed_admin,sn_hr_sp.admin,sn_templated_snip.template_snippet_writer,evam_admin,ml_labeler,sp_admin,import_admin,pa_data_collector,announcement_admin,sn_templated_snip.template_snippet_reader,user_criteria_admin,image_admin,sn_employee.admin,sn_nlu_workbench.nlu_feedback_admin';
	window.NOW.user.userID = '5e1826c1539f12104d8731f0a0490e94';
	window.NOW.user.departmentID = '';
	window.NOW.user.firstName = 'Samuel';
	window.NOW.user.lastName = 'Johnson';
	window.NOW.user.name = 'Samuel.Johnson.9662';
  	window.NOW.user.isImpersonating = false;
	window.NOW.batch_glide_ajax_requests = 'true' === 'true';
	window.NOW.batch_glide_ajax_requests_max_time_in_queue = ~~'50';
	window.NOW.batch_glide_ajax_disable_time = ~~'1000';

	window.NOW.currency = {};
	window.NOW.currency.code = 'USD';
	window.NOW.locale = {};
	window.NOW.locale.code = 'en_US';

	window.NOW.attachment = {};
	
	window.NOW.attachment.overflow_limit =  parseInt('3', 10);
	window.NOW.isPolarisEnabled = "true";
	window.NOW.polaris_page_info ={"canUsePolarisCSS":true,"canUsePolarisTemplates":true,"jvar_form_name":"sys_form_template"};

(function() {
		 g_render_functions.push(setGlideUser);
		function setGlideUser() {
			if (window.g_user || !window.GlideUser)
		return;

		window.g_user = new GlideUser(NOW.user.name,
			  NOW.user.firstName,
			  NOW.user.lastName,
			  NOW.user.roles,
			  NOW.user.userID,
			  NOW.user.departmentID);
		window.g_user.setRoles(NOW.user.allRoles, true);
		}
	})();

window.snWebaConfig = window.snWebaConfig || {};
		// glide web analytics config
		window.snWebaConfig.siteId = "0";
		window.snWebaConfig.trackerURL = "";
		window.snWebaConfig.webaScriptPath = "/scripts/piwik-3.1.1/thirdparty/piwik.min.js";
		window.snWebaConfig.ambClient = (window.g_ambClient) ? window.g_ambClient : ((window.amb)? window.amb.getClient(): "");
		window.snWebaConfig.subscribed = false;

(function () {
				try {
					window.NOW = window.NOW || {};
					window.NOW.UXMetrics = window.NOW.UXMetrics || {};
					var config = '';
					if (config) {
						window.NOW.UXMetrics.config = JSON.parse(config);
						window.NOW.UXMetrics.ucmInfo = {
							user_analytics_consent_text: '',
							user_consent : ""
						};
					}
				} catch(err) {}
			})();

NOW.xperf.cssEnd = NOW.xperf.now();
			NOW.xperf.scriptBegin = NOW.xperf.now();

/**
	* Every window needs to observe these events.
	*/
	if (Prototype.Browser.IE && !isMSIE9) {
		document.onfocusout = function() { CustomEvent.fireTop(GlideEvent.WINDOW_BLURRED, window); };
		document.onfocusin = function() { CustomEvent.fireTop(GlideEvent.WINDOW_FOCUSED, window); };
	} else {
		Event.observe(window, 'blur', function() { CustomEvent.fireTop(GlideEvent.WINDOW_BLURRED, window); });
		Event.observe(window, 'focus', function() { CustomEvent.fireTop(GlideEvent.WINDOW_FOCUSED, window); });
	}

g_swLoadTime = new StopWatch(g_loadTime);

    if (window.CustomEvent){
        CustomEvent.fireAll("ck_updated", "271822c1539f12104d8731f0a0490e402b5821db002250cc0f090c2982cf70a9abb62fd0");
	    CustomEvent.fireTop("navigation.complete", window);
	}

    addLoadEvent( function() {

		if (isValidTouchDevice())
			addTouchScrollClassToBody();

      if (typeof g_ck != 'undefined') {
        CustomEvent.observe("ck_updated", function(ck) { g_ck = ck; });
        CustomEvent.fireAll("ck_updated", "271822c1539f12104d8731f0a0490e402b5821db002250cc0f090c2982cf70a9abb62fd0");CustomEvent.fireTop('user.impersonation', '');}try {
              var helpico = getTopWindow().document.getElementById("help_ico");

              if (helpico) {
                var urlname=window.location.pathname.split("?");
                var search_str = window.location.search;
                
                // if this is a form, extract the record's sys_id...
                var sys_id_loc = search_str.search(/sys_id=[0-9a-f]{32}/i);
                var sys_id_str = (sys_id_loc != -1) ? search_str.substr(sys_id_loc, 39) : null;
                
                // make the URL to our context help processor...
                var url_search = "?sysparm_url=" + urlname[0];
                if (sys_id_loc != -1)
                   url_search += "&" + sys_id_str;

               	helpico.href="context_help.do" + url_search;                	
              }
            } catch (exception) {}

      synchCache();
      pageLoaded();
    });
    
    function synchCache() {
      try {
        var w = getTopWindow();
        if (w.g_cache_message)
          w.g_cache_message.stamp("67db3330531312104d8731f0a0490e77");
  
        if (w.g_cache_td)
          w.g_cache_td.stamp("7bc12e49535f12104d8731f0a0490e75");
      } catch(e) {}
    }

    function isValidTouchDevice() {
		var navigator = window.navigator || {};
		var devices;
		try {
			devices = 'iPad,Android'.split(',');
		} catch(ex) {
			devices = [];
		}
		return devices.some(function(item) {return item.trim() === navigator.platform;});
	}

	function addTouchScrollClassToBody() {
		if ('ontouchstart' in window ||
				(navigator.maxTouchPoints !== 'undefined' && navigator.maxTouchPoints > 0) ||
				(navigator.msMaxTouchPoints !== 'undefined' && navigator.msMaxTouchPoints > 0)) {
			if (typeof document.body != undefined) {
				document.body.classList.add('touch_scroll');
			}
		}
	}
  
window.NOW = window.NOW || {};
        NOW.amb_themed_login = true;

NOW.xperf.scriptEnd = NOW.xperf.now();
				NOW.xperf.parseEnd = NOW.xperf.now();

		NOW.xperf.formBegin = NOW.xperf.now();
		var gFormSW = new StopWatch();

		var g_formDirtyFocus = false;
		// remove potential closure leak, see exhibit 7 in the following article:
		// http://www.codeproject.com/Articles/12231/Memory-Leakage-in-Internet-Explorer-revisited
		document.body.onmousedown = dirtyFormFocus;

		function dirtyFormFocus() {
			jslog("dirty form focus");
			g_formDirtyFocus = true;
			document.body.onmousedown = null;
		}

		var g_tabs_preference = true;
		var g_tabs_print = false;
		var g_tabs_reference = 'change_request'; // name for state maintenance (which tab we are on for a form)
		
		window.NOW['personalize_change_request_default'] = 'cab_date_time,cab_delegate,cab_recommendation,cab_required,priority,requested_by';

		var g_related_list_timing = "default";

window.CustomEvent = window.CustomEvent || {};
	window.CustomEvent.fire = window.CustomEvent.fire || function() {};
	window.NOW.ng_cache_defeat = false;
	window.NOW.ui_policy = {};
	window.NOW.ui_policy.debug = false;
	window.NOW.initiallyLoggedIn = true;
	window.NOW.externalAuthentication = false;
	window.NOW.ac_wait_time = parseInt(250);
	window.NOW.listFormModal = false;
	window.NOW.maximumListCharacters = 40;
	window.NOW.user_email = 'samuel.johnson.9662@workarena.com';
	window.NOW.user_roles = 'platform_ml_create,import_transformer,taxonomy_admin,ais_admin,catalog_builder_editor,nlu_admin,catalog,catalog_template_editor,catalog_lookup_admin,admin,ml_admin,platform_ml_read,platform_ml_write,chat_admin,search_application_admin,search_relevancy_model_admin,import_set_loader,catalog_admin,sn_ace.ace_user,import_scheduler,pa_viewer,nlu_editor,sn_templated_snip.template_snippet_admin,sn_hr_sp.esc_admin,nlu_user,personalize_dictionary,live_feed_admin,sn_hr_sp.admin,sn_templated_snip.template_snippet_writer,evam_admin,ml_labeler,sp_admin,import_admin,pa_data_collector,announcement_admin,sn_templated_snip.template_snippet_reader,user_criteria_admin,image_admin,sn_employee.admin,sn_nlu_workbench.nlu_feedback_admin';

	var g_searchWaitTime = 100;
	window.NOW.clientTiming = {
		serverTime: parseInt("82") + parseInt("0"),
		transactionId: 'a4286a81539f12104d8731f0a0490e94',
		tableName: 'change_request',
		formName: '',
		viewId: 'Default view',
		pageInitTime: g_loadTime
	};

		// record watch / presence
		window.NOW.session_id = 'E31822C1539F12104D8731F0A0490E40';
		window.NOW.user_name = 'Samuel.Johnson.9662';
		window.NOW.user_id = '5e1826c1539f12104d8731f0a0490e94';
		window.NOW.user_display_name = 'Samuel Johnson';
		window.NOW.user_initials = 'SJ';
		window.NOW.user_avatar = '';
		window.NOW.presence_interval = 60;
		window.NOW.record_presence_interval = 20;
		window.NOW.ambConnected = false;

					NOW.streamLinkTarget = '';
					NOW.stream_poll_interval = parseInt(120);
					NOW.targetTable = 'change_request'
					NOW.sysId = 'f028ee81539f12104d8731f0a0490ef1';

addLoadEvent(function() {
											var event = window.isPolaris() ? "polaris:legacy.formSubmit" : "back.gsftSubmit";
											CustomEvent.observe(event, gsftSubmitBack);
											CustomEvent.observe("polaris:legacy.formModified", function(modified) {
												window.g_form.modified = modified;
											});
										});

btn btn-icon icon-menu navbar-btn additional-actions-context-menu-button

contextShow(event, '1', 200, grabOffsetTop(this) + 20, grabOffsetLeft(this) + 24);event.cancelBubble=true;Event.stop(event);

function getFavoriteURL() {
									var pathName = window.location.pathname.startsWith('/') ? window.location.pathname.substr(1) : window.location.pathname;
									return pathName + window.location.search;
								}

event.dataTransfer.setData('text', Object.toJSON({ icon: 'form', url: getFavoriteURL(), title: g_form.getTitle(), table: g_form.getTableName() }))

avatar avatar-md sn-popover-presence sn-popover-basic ng-binding

function setMaxHeight(){
			if(document.getElementById("form_presence_users"))
				document.getElementById("form_presence_users").style.maxHeight = (window.innerHeight - 150) + "px";
		}

		<span ng-if="viewingUsers"><sn-avatar-popover primary="viewingUsers[0]" ng-if="viewingUsers.length == 1" show-presence="true"></sn-avatar-popover><div ng-show="viewingUsers.length &gt; 1" class="form-presence-users-multiple" onclick="setMaxHeight()"><a aria-haspopup="true" aria-label="{{viewingUsers.length}} users viewing this record" role="button" class="avatar avatar-md sn-popover-presence sn-popover-basic" href="javascript:void(0);" title="Viewing this record" ng-bind="viewingUsers.length" data-placement="bottom" data-toggle="popover" data-target="#form_presence_users"></a><div id="form_presence_users" style="min-height: 20px"><ul><li ng-repeat="user in viewingUsers"><sn-avatar-popover primary="user" show-presence="true"></sn-avatar-popover><span class="user-name">{{ user.displayName }}</span></li></ul></div></div><now-message key="{name} has set this field to {value}" value="{name} has set this field to {value}"></now-message><now-message key="{name} has cleared the value of this field" value="{name} has cleared the value of this field"></now-message><now-message key="{name} has modified this field value" value="{name} has modified this field value"></now-message></span><script>function setMaxHeight(){
		}

	<div class="avatar-container" ng-class="avatarType()" title="{{ avatartooltip() }}" tabindex="-1">

		<div class="avatar soloAvatar top" ng-if="(users.length &gt; 1 &amp;&amp; !groupAvatar)" context-menu="contextOptions">
			<div class="sub-avatar" role="button" ng-style="getBackgroundStyle(users[1])" aria-label="{{users[1].name}}, {{presenceStatus}}">
				<span ng-if="!users[1].avatar">{{ users[1].initials }}</span></div></div>

		<div class="avatar soloAvatar bottom" context-menu="contextOptions">
			<div class="sub-avatar" role="button" ng-style="getBackgroundStyle(users[0] || primary)" aria-label="{{users[0].name}}, {{presenceStatus}}">
				<span ng-if="(!users[0].avatar &amp;&amp; !groupAvatar)">{{ users[0].initials }}</span></div></div>

		<div class="avatar soloAvatar top" ng-if="users.length &gt; 2 &amp;&amp; !groupAvatar" context-menu="contextOptions">
			<div class="sub-avatar" role="button" ng-style="getBackgroundStyle(users[2])" aria-label="{{users[2].name}}, {{presenceStatus}}">
				<span ng-if="!users[2].avatar">{{ users[2].initials }}</span></div></div>

		<div class="avatar soloAvatar top" ng-if="users.length &gt; 3 &amp;&amp; !groupAvatar" context-menu="contextOptions">
			<div class="sub-avatar" role="button" ng-style="getBackgroundStyle(users[3])" aria-label="{{users[3].name}}, {{presenceStatus}}">
				<span ng-if="!users[3].avatar">{{ users[3].initials }}</span></div></div>

		<span class="inner-details" ng-transclude=""></span>
		<sn-presence ng-if="::presenceEnabled" user="(users[0].userID || users[0].document)" on-presence-change="onPresenceChange(status)"></sn-presence></div>

		<a class="sn-popover-complex" role="presentation" ng-style="{'cursor': popoverCursor}" style="background-color: transparent"><div class="avatar soloAvatar top" ng-if="users.length &gt; 1 &amp;&amp; !groupAvatar"><div aria-label="{{ users[0].displayName }} {{ users[0].status }}" user-avatar-id="{{users[0].userID}}" ng-click="loadFullProfile(); togglePopover($event); stopPropCheck($event);" role="button" tabindex="0" title="{{ avatartooltip() }}" aria-haspopup="true" class="sub-avatar" ng-style="getBackgroundStyle(users[1])"><span ng-if="!users[1].avatar">{{ users[1].initials }}</span></div></div><div class="avatar soloAvatar bottom"><div aria-label="{{ users[0].displayName }} {{ users[0].status }}" user-avatar-id="{{users[0].userID}}" ng-click="loadFullProfile(); togglePopover($event); stopPropCheck($event);" role="button" tabindex="0" title="{{ avatartooltip() }}" aria-haspopup="true" class="sub-avatar" ng-style="getBackgroundStyle(users[0] || primary)"><span ng-if="!users[0].avatar &amp;&amp; !groupAvatar">{{ users[0].initials }}</span></div></div><div class="avatar soloAvatar top" ng-if="users.length &gt; 2 &amp;&amp; !groupAvatar"><div aria-label="{{ users[0].displayName }} {{ users[0].status }}" user-avatar-id="{{users[0].userID}}" ng-click="loadFullProfile(); togglePopover($event); stopPropCheck($event);" role="button" tabindex="0" title="{{ avatartooltip() }}" aria-haspopup="true" class="sub-avatar" ng-style="getBackgroundStyle(users[2])"><span ng-if="!users[2].avatar">{{ users[2].initials }}</span></div></div><div class="avatar soloAvatar top" ng-if="users.length &gt; 3 &amp;&amp; !groupAvatar"><div aria-label="{{ users[0].displayName }} {{ users[0].status }}" user-avatar-id="{{users[0].userID}}" ng-click="loadFullProfile(); togglePopover($event); stopPropCheck($event);" role="button" tabindex="0" title="{{ avatartooltip() }}" aria-haspopup="true" class="sub-avatar" ng-style="getBackgroundStyle(users[3])"><span ng-if="!users[3].avatar">{{ users[3].initials }}</span></div></div><sn-presence ng-if="::presenceEnabled" user="users[0].userID || users[0].document" display-name="users[0].displayName"></sn-presence></a>

		<span class="avatar-container" ng-class="avatarType()"><sn-complex-popover ng-if="!noPopover()" template="sn_avatar_content.xml" button-template="sn_avatar_button.xml"></sn-complex-popover><sn-complex-popover ng-if="noPopover()" button-template="sn_avatar_button.xml"></sn-complex-popover></span>

if (window.parent && window.parent.closeFormModal)
										document.getElementById('close_modal').style.display = 'inline-block';

if('false' == 'true')
		$$('nav.navbar')[0].setStyle({marginBottom: '0px'});

 var messages = new GwtMessage();
messages.set('Mandatory - preloaded with saved data');
messages.set('Field value has changed since last update');
messages.set('Mandatory - must be populated before Submit');
messages.set('Read only - cannot be modified');
messages.set('Add Tag...','Add tag...');
messages.set('Edit tag audience');
messages.set('{0} ({1})');
messages.set('({0} of {1})');
messages.set('Changes have been made, continuing will discard the changes. Click \'OK\' to discard changes.');
})()

section_header_content_no_scroll touch_scroll   overflow_x_hidden-hotfix

if (!window.NOW) window.NOW = {};
			window.NOW.g_forceDownloadAttachments = true;

allow-resize-height inline-block-items with-plus-more with-ellipsis

javascript:saveAttachment('change_request', 'f028ee81539f12104d8731f0a0490ef1');; return false;

				if (typeof AttachmentUploader !== "undefined") {
					AttachmentUploader.addDropZone(document.body, "1024",
					"true", "true", "true", "");
				}
			});

addRenderEvent(function() {CustomEvent.fire('glide_optics_inspect_update_watchfield', '');});

			var accessibilityEnabled = Boolean(false);
			var hasMessages = false;
			if (accessibilityEnabled && hasMessages) {
				$j(function() {
					$j('#output_messages .btn.btn-icon.close').focus();
				});
			}

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.requested_by'); if (!e.ac) new AJAXTableCompleter(gel('sys_display.change_request.requested_by'), 'change_request.requested_by', '', ''); e.ac.onFocus();})

		window.NOW.useHiddenDependent = 'true'.toLowerCase() === 'true';

onChange('change_request.category', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('category');

if (window.navigator.userAgent.indexOf("Edge") !== -1) {
    	var element = document.getElementById('change_request.category');
		var options = element.options;
		for (var optionIndex in options) {
			if ( options[optionIndex].title ) {
				options[optionIndex].label = options[optionIndex].label + " ( " + options[optionIndex].title + " )";
			}
		}
    }

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.business_service'); if (!e.ac) new AJAXReferenceCompleter(gel('sys_display.change_request.business_service'), 'change_request.business_service', '', 'true'); e.ac.onFocus();})

var fieldName;
		function onChangeBusinessServiceShowBSM(element, original, changed, loading) {
			var visibility = 'hidden';
			if (changed.length > 0)
				visibility = 'visible';
			var e = gel('show_business_service_related_bsm_map:change_request.business_service');
			e.style.visibility = visibility;
		}

		// Only allow clicking when the reference field contains full, valid data
		function showBSM(name) {
			fieldName = name.split(':')[1];
			var n = gel(fieldName);
			n = n.value;
			if (n.length == 0)
				alert("Populate Business Service first");
			else
				buildUrl(n);
		}

		function buildUrl(sys_id) {
			var url = '';
			url += '$ngbsm.do?id=' + sys_id;
			url += '&';
			url += 'serviceView=' + '';
			url += '&';
			url += 'sysparm_nostack=true';
			url += '&';
			url += 'fromTask=' + g_form.getUniqueValue();
			// Open the map in a new window and focus it
			g_navigation.open(url, 'super_bsm_map');
		}
		var table = 'change_request';
		var event = new GlideEventHandler('onChange_' + table + '_business_service_related_bsm', onChangeBusinessServiceShowBSM, 'change_request.business_service');
		g_event_handlers.push(event);

function onChangeBusinessServiceShowRelated(element, original, changed, loading) {
			if (loading) {
				return;
			}
			if (changed.length == 0) {
				hideBusinessServiceRelatedRecord();
				return;
			}
			var ga = new GlideAjax('ShowRelatedTasksForBusinessService');
			ga.addParam('sysparm_name', 'hasRelatedTaskCount');
			ga.addParam('sysparm_business_service', g_form.getValue('change_request.business_service'));
			ga.addParam('sysparm_sys_id', g_form.getUniqueValue());
			ga.getXML(showRelatedTaskCallback);
		}

		function showRelatedTaskCallback(response) {
			var answer = response.responseXML.documentElement.getAttribute("answer");
			if (answer === 'true')
				showBusinessServiceRelatedRecord();
			else
		}
		function hideBusinessServiceRelatedRecord(){
			var e = $('show_business_service_related_records_change_request.business_service');
			e.style.visibility = 'hidden';
			e.style.position = 'absolute';
			e.style.left = '-1000px';
		}
		function showBusinessServiceRelatedRecord(){
			e.style.visibility = 'visible';
			e.style.position = '';
			e.style.left = '';
		}

		var h = new GlideEventHandler('onChange_incident_business_service_show_related', onChangeBusinessServiceShowRelated, 'change_request.business_service');
		g_event_handlers.push(h);

		function showBusinessServiceTasksDialog(reference){
			var v = g_form.getValue(reference);
			var w = new GlideDialogWindow('show_list');
			w.setTitle(getMessage('Other active tasks affecting this Business Service'));
			w.setPreference('table', 'task_list');
			w.setPreference('sysparm_view', 'default');
			w.setPreference('sysparm_query', "active=true^sys_id!=" + g_form.getUniqueValue() + "^business_service=" + v + "^GROUPBYsys_class_name");
			w.setPreference('focusTrap', true);
			w.render();
		}

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.service_offering'); if (!e.ac) new AJAXReferenceCompleter(gel('sys_display.change_request.service_offering'), 'change_request.service_offering', '', 'true'); e.ac.onFocus();})

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.cmdb_ci'); if (!e.ac) new AJAXTableCompleter(gel('sys_display.change_request.cmdb_ci'), 'change_request.cmdb_ci', 'company', 'true'); e.ac.onFocus();})

// Only show the button is the reference field has content
        function onChange_cmdb_ci_bsm(element, original, changed, loading) {
            var visibility = 'hidden';
            if (changed.length > 0)
                visibility = 'visible';

            var e = gel('show_map:change_request.cmdb_ci');
            e.style.visibility = visibility;
        }

        // Only allow clicking when the reference field contains full, valid data
        function showMap(name) {
            var fieldName = name.split(':')[1];
            var n = gel(fieldName);
            n = n.value;

            if (n.length == 0)
                alert("Populate CI field first");
            else
                showBSMMap(n, fieldName);
        }

        // Construct a link to the correct version of BSM and open it
        function showBSMMap(sys_id, fieldName) {
            var url = '';

            // When using NGBSM, use a simplified link
            url += '$ngbsm.do?id=' + sys_id;
            url += '&';
            url += 'serviceView=' + 'false';
			url += '&';
		    url += 'sysparm_nostack=true'; //PRB675289 - support 'back' correctly 
            url += '&';
            url += 'fromTask=' + g_form.getUniqueValue();

            // Open the map in a new window and focus it
            g_navigation.open(url, 'super_bsm_map');
        }

        // Create input changed event handlers for all relevant tables
        var a = ['incident', 'change_request', 'problem'];
        for (i = 0; i < a.length; i++) {
            var h = new GlideEventHandler('onChange_' + a[i] + '_cmdb_ci_bsm', onChange_cmdb_ci_bsm, 'change_request.cmdb_ci');
            g_event_handlers.push(h);
        }

.show_related_records_hidden {
			visibility: hidden;
			position: absolute;
			left: -1000px;
		}

btn btn-ref btn-default icon-warning-circle show_related_records_hidden

      needsRefresh = false;
      function onChange_cmdb_change_requestcmdb_ci_ci_show_related(element, original, changed, loading) {
         if (needsRefresh == false) {
            needsRefresh = true;
            return;
         }
         if (changed.length == 0 || false === false) {
            $('show_related_tasks_change_request.cmdb_ci').addClassName('show_related_records_hidden');
            return;
         }
         var ga = new GlideAjax('ShowRelatedTasksAjax');
         ga.addParam('sysparm_name', 'getRelatedTaskCount');
         ga.addParam('sysparm_ci', g_form.getValue('change_request.cmdb_ci'));
         ga.addParam('sysparm_task', g_form.getUniqueValue());
         ga.getXML(relatedTaskReturn);
      }

      function relatedTaskReturn(response) {
         var answer = parseInt(response.responseXML.documentElement.getAttribute("answer"));
         var e = $('show_related_tasks_change_request.cmdb_ci');
         if (answer > 0)
            e.removeClassName('show_related_records_hidden');
         else
		    e.addClassName('show_related_records_hidden');
      }

      var h = new GlideEventHandler('onChange_incident_change_requestcmdb_ci_cmdb_ci_show_related', onChange_cmdb_change_requestcmdb_ci_ci_show_related, 'change_request.cmdb_ci');
      g_event_handlers.push(h);

      })();

      function showTasksDialog(reference) {
         var v = g_form.getValue(reference);
         var w = new GlideDialogWindow('show_list');
         w.setTitle(getMessage('Other active tasks affecting this Configuration Item'));
         w.setPreference('table', 'task_ci_list');
         w.setPreference('sysparm_view', 'task_rel_ci');
         w.setPreference('sysparm_query', "task.active=true^task.sys_id!=" + g_form.getUniqueValue() + "^ci_item=" + v);
	     w.setPreference('focusTrap', true);
         w.render();
      }

				var buttonElem = $("show_ci_health_change_request.cmdb_ci");
				var buttonIconElem = $("icon_show_ci_health_change_request.cmdb_ci");

				var classHealthOK = "icon-database";
				var classHealthNotOK = "icon-database";
				var classRefreshing = "icon-refreshing";

				function checkHealth(element, original, changed, loading) {
					var isValidCI = false;

					// If we've hidden the icon on form load it means that either we don't have a CI in the associated field 
					// or the value in that field is invalid so we don't want to show the field until there's been a change
					if (loading && !isValidCI)
						return;

					if (changed) {
						refreshHealthIcon();
						buttonElem.style.visibility = 'visible';
						buttonElem.style.position = '';
						buttonElem.style.left = '';

						new Ajax.Request('/api/now/cmdbHealth/healthInfo', {
							method: 'get',
							requestHeaders: {
								'X-UserToken': window.g_ck,
								'Accept': 'application/json'
							},
							parameters: {
								"sysparm_ci_sys_ids" : changed
							},
							onSuccess: function(response) {
								displayHealthIcon(response);
							},
							onFailure: function() {
								hideHealthIcon();
							}
						});
					} else
						hideHealthIcon();
				}

				function displayHealthIcon(response){
					if (response && response.responseJSON && response.responseJSON.result && response.responseJSON.result.length != 0) {
						var result = response.responseJSON.result[0];

						$("show_ci_health_change_request.cmdb_ci").writeAttribute("href", result.health_dashboard_url);

						if (result.health_result) {
							buttonIconElem.removeClassName(classRefreshing);
							buttonIconElem.addClassName(classHealthOK);
						} else {
							buttonIconElem.addClassName(classHealthNotOK);
						}
					} else
				}

				function hideHealthIcon(){
					buttonElem.style.visibility = 'hidden';
					buttonElem.style.position = 'absolute';
					buttonElem.style.left = '-1000px';

					$("show_ci_health_change_request.cmdb_ci").writeAttribute("href", "#");
				}

				function refreshHealthIcon(){
					buttonIconElem.addClassName(classRefreshing);
					buttonIconElem.removeClassName(classHealthOK);
					buttonIconElem.removeClassName(classHealthNotOK);
				}

				// Create an event handler to watch for changes on the field this "icon" is rendered next to
				var h = new GlideEventHandler('onChange_cmdb_ci_health_change_request.cmdb_ci', checkHealth, 'change_request.cmdb_ci');
				g_event_handlers.push(h);

				// Prevent clicks if there isn't a valid href
				buttonElem.on("click", function (event) {
					var url = this.readAttribute("href");
					if (!url || url == "#")
						event.preventDefault();
				});
			})();

Sequence in which an Incident or Problem needs to be resolved, based on impact and urgency

onChange('change_request.priority', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('priority');

    	var element = document.getElementById('change_request.priority');
			}
		}
    }

onChange('change_request.risk', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('risk');

    	var element = document.getElementById('change_request.risk');
			}
		}
    }

onChange('change_request.impact', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('impact');

    	var element = document.getElementById('change_request.impact');
			}
		}
    }

onChange('change_request.approval', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('approval');

    	var element = document.getElementById('change_request.approval');
			}
		}
    }

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.chg_model'); if (!e.ac) new AJAXReferenceCompleter(gel('sys_display.change_request.chg_model'), 'change_request.chg_model', '', 'true'); e.ac.onFocus();})

onChange('change_request.type', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('type');

    	var element = document.getElementById('change_request.type');
			}
		}
    }

onChange('change_request.state', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('state');

    	var element = document.getElementById('change_request.state');
			}
		}
    }

    	var element = document.getElementById('change_request.conflict_status');
			}
		}
    }

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.assignment_group'); if (!e.ac) new AJAXReferenceCompleter(gel('sys_display.change_request.assignment_group'), 'change_request.assignment_group', '', ''); e.ac.onFocus();})

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.assigned_to'); if (!e.ac) new AJAXTableCompleter(gel('sys_display.change_request.assigned_to'), 'change_request.assigned_to', 'assignment_group', ''); e.ac.onFocus();})

Search Knowledge
			  To activate press Enter. On Enter opens in a new window

addLoadEvent(
			function() {
				if (window['textareaResize'])
					textareaResize('change_request.description');
			}
		);

width: 100%; resize: none; overflow: hidden; overflow-wrap: break-word;

if (window.TextAreaElement) {
								addRenderEvent(function() {
								if (typeof g_form != "undefined") {
									if(!g_form.elementHandlers['change_request.description']) {
										g_form.registerHandler('change_request.description', new TextAreaElement('change_request.description'));
									}
								}
								});
							}

					textareaResize('change_request.on_hold_reason');
			}
		);

									if(!g_form.elementHandlers['change_request.on_hold_reason']) {
										g_form.registerHandler('change_request.on_hold_reason', new TextAreaElement('change_request.on_hold_reason'));
									}
								}
								});
							}

Enter benefits of implementing this change and impact if this change is not implemented

					textareaResize('change_request.justification');
			}
		);

									if(!g_form.elementHandlers['change_request.justification']) {
										g_form.registerHandler('change_request.justification', new TextAreaElement('change_request.justification'));
									}
								}
								});
							}

Enter sequential steps to implement this change. In addition, enter dependencies between steps and assignee details for each step

					textareaResize('change_request.implementation_plan');
			}
		);

									if(!g_form.elementHandlers['change_request.implementation_plan']) {
										g_form.registerHandler('change_request.implementation_plan', new TextAreaElement('change_request.implementation_plan'));
									}
								}
								});
							}

Enter potential risks and impact associated with this change. Include impact details if this change implementation is unsuccessful

					textareaResize('change_request.risk_impact_analysis');
			}
		);

									if(!g_form.elementHandlers['change_request.risk_impact_analysis']) {
										g_form.registerHandler('change_request.risk_impact_analysis', new TextAreaElement('change_request.risk_impact_analysis'));
									}
								}
								});
							}

Enter steps to revert the change to its state prior to implementation. Include information regarding when the change can be backed out during implementation and if the change window includes time to backout

					textareaResize('change_request.backout_plan');
			}
		);

									if(!g_form.elementHandlers['change_request.backout_plan']) {
										g_form.registerHandler('change_request.backout_plan', new TextAreaElement('change_request.backout_plan'));
									}
								}
								});
							}

Enter details of planned and completed tests prior to implementation that indicate the potential success of this change. Enter details of planned post-implementation tests to confirm success of this change

					textareaResize('change_request.test_plan');
			}
		);

									if(!g_form.elementHandlers['change_request.test_plan']) {
										g_form.registerHandler('change_request.test_plan', new TextAreaElement('change_request.test_plan'));
									}
								}
								});
							}

Planned start date and Planned end date are the requested change window

form-control text-align-right-ltr element_reference_input  datex

Change activity detected without prior authorization. To unset this field create an Outage of type Outage or Degradation.

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.cab_delegate'); if (!e.ac) new AJAXTableCompleter(gel('sys_display.change_request.cab_delegate'), 'change_request.cab_delegate', '', ''); e.ac.onFocus();})

					textareaResize('change_request.cab_recommendation');
			}
		);

									if(!g_form.elementHandlers['change_request.cab_recommendation']) {
										g_form.registerHandler('change_request.cab_recommendation', new TextAreaElement('change_request.cab_recommendation'));
									}
								}
								});
							}

.ie-conflicts {
						margin: 15px 0px 15px 0px;
						overflow: auto;
						border: solid transparent 1px;
					}

					.ie-conflict-status {
						float: left;
					}

					.ie-check-conflicts {
						float: right;
					}

Configuration item/Affected CIs, Planned start date and Planned end date are required to run conflict detection

<div><table cellspacing="0" width="100%"><tbody><tr><td style="text-align: left;"><span><b>Conflict Detection</b></span></td></tr></tbody></table><div><div><div class="progress"><div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuenow="100" aria-valuemax="100" style="width: 100%; min-width: 0px;"><span class="sr-only">100% (canceled)</span></div></div><div style="text-align: right;"><span style="width: 100%; word-wrap: break-word; font-weight: bold;">Conflict detection has been canceled</span></div></div></div></div>

							initializeConflictDetection();
						});

		// GlideList2 initialization	
	    var f = function() {
			// register the handlers at most once per page
			if (typeof(g_listHandlersLoaded) == 'undefined') {
				g_listHandlersLoaded = true;
				new GlideList2NewHandler();
				new GlideList2ChecksHandler();
				new GlideList2SecurityHandler();

				addLoadEvent(function() {
					CustomEvent.observe("toggle.sections", GlideList2.toggleAll);
				});
			}
			// Initialize GwtListEditor for Dashboards.
			CustomEvent.fire('init.gwt_editor');

			// create the GlideList2 object for this list
			var list = new GlideList2("30282ac1539f12104d8731f0a0490e67", "conflict", "");
			list.isReport = '';
			list.groupSort = '';

			list.setListName('change_request.REL:ebef7dc8eff002008e4c36caa5c0fb45');
			list.setFields('type,schedule,conflicting_change,configuration_item,impacted_service,last_checked');
			list.setTitle('Conflicts Detected');
			list.setListControlID('-1');
			list.setProperties('H4sIAAAAAAAA/42V227jIBCGX8Xivq2do7OKU626B1XKxWrbXiMMQ4yCjRdw0rz9jh3iJNV240vPDP8H/wx4+fhe6mgH1ilTZSS5j0kEFTdCVZuMvL3+uEvJ42q5Vs7/sqYG6xW4iDtHK1ZCRqDMQQgQJJKabVxGZvN0PB/PFyFA/d6gbIqfhjeOmopakBZckRFvGyBRwRyFd64bVKHWaLhMeJZroC2XeWNRXjLtMKccbRxYqnFffbD9oFwzh3U/tRLQ7np0ipvKozpVIiN3SQiCUJ76Q41Mx3ZA98oXVBpbhnxbPI5H6YjxZDpeyGSUxBORzseJjFk8WcQwm4fSo8rv72sSHZ3hBas2gKf904Dz95j5AjnIueApSBnHozhOYcLHM87YlMcyn0xJVDML1ZErkQuQfsKVSV/cefSRRyILmnkQ3Z4GkC3Uxnq6saapaX7oTbVmT1UlEJQR9PIEM5XUiiPGK98GnkLARd/AA/ftRHQp6nCSGs3suYasllKBFm0XcRgAT8Hh3EWWg87IK/pJIlcgXqtqexoKz+wGfNejy13smG7awWkXPfxb/rg+qL/wAkSjbxPKirq+NlD6wBDS6dDoQnRs0U3mh0YGKj8L0SA0hP9Vyq4d0dPz7cOKnHJ1RVSbBq8evg1UeSgHEZ/LmnXEF7A7xQd43GGpO5UHvAo6feIT+PXcrJnzaDTwbTuCF+RQ9v8BwscDn4qwGnl4xfAye3weT7faaI1+qu4d050zrlB1L3Dzog0RxTNLdTFwtxZt4TC09tzc6ykbvC30/4r1cP1rWP0FedD1p1EGAAA=');
			// pass order by, since it can come from sources other than the query string
            list.setOrderBy('');

			if (list.setOmitCount) {
				list.setOmitCount(false);
			}
            
			// save the data that we will need to refresh the list
			list.setView('');
			list.setSubmitValue('sysparm_list_css', 'embedded');
			list.setSubmitValue('sysparm_target', '');
            list.setSubmitValue('sysparm_fixed_query', '');
            list.setSubmitValue('sysparm_group_sort', '');
            // if rows per page is specified, carry it along
            if ('')
               list.setSubmitValue('sysparm_rows_per_page', '');
               
            if ('')
               list.setSubmitValue('sysparm_nameofstack', '');
               
            if ('')
               list.setSubmitValue('sysparm_transaction_scope', '');
               
            if ('')
               list.setSubmitValue('sysparm_record_scope', '');
               
            if ('')
            	list.setSubmitValue('sysparm_query_no_domain', '');

			list.setReferringURL("change_request.do");// save the data needed for submitting actions for related lists
				list.setRelated('change_request', 'REL:ebef7dc8eff002008e4c36caa5c0fb45');
				list.setSubmitValue('sysparm_collection', 'change_request');
				list.setSubmitValue('sysparm_collectionID', 'f028ee81539f12104d8731f0a0490ef1');
				list.setSubmitValue('sysparm_collection_key', '');
				list.setSubmitValue('sysparm_collection_related_file', '');
				list.setSubmitValue('sysparm_collection_related_field', '');
				list.setSubmitValue('sysparm_collection_relationship', 'ebef7dc8eff002008e4c36caa5c0fb45');
				list.setSubmitValue('sysparm_collection_related_relationship', 'REL:ebef7dc8eff002008e4c36caa5c0fb45');
				list.setSubmitValue('sysparm_collection_label', 'Conflicts Detected');
				list.setSubmitValue('sys_is_related_list', 'true');
				var domain = gel('sysparm_domain');
				if (domain)
					list.setSubmitValue('sysparm_domain', gel('sysparm_domain').value);
				var domainScope = gel('sysparm_domain_scope');
				if (domainScope)
					list.setSubmitValue('sysparm_domain_scope', domainScope.value);
				list.setEmbedded(true);list = null;
		  };
		  
		  // hierarchical list patch - all lists have to be loaded before the context menus can be built
		  // this is wokring by trick, not design -- code pre 25 dec 2011 had a similar trick 
		  // better design would be to create the context menus after all the hiererchical lists are loaded
		  if (typeof GlideList2 == "undefined")
		  	addLoadEvent(f);
		  else 
		    f.call();

navbar navbar-default list_nav list_nav_top embedded list_nav_top_border

addLoadEvent(function() {new GlideWidgetVCR('70282ac1539f12104d8731f0a0490e67', '30282ac1539f12104d8731f0a0490e67', false && true)})

// setting 
			function setListTableWrap() {
				if (window.NOW.listTableWrap) 
					$j('HTML').removeClass('list-nowrap-whitespace');
				else
					$j('HTML').addClass('list-nowrap-whitespace');
			}
			
			setListTableWrap();
			CustomEvent.observe('table_wrap', function (trueFalse) {
				window.NOW.listTableWrap = trueFalse; 
				setListTableWrap();
			});

list2-edit-button btn btn-default sn-tooltip-basic sr-only sr-only-focusable

In inline edit mode:<br/>      Press Enter to edit the selected field.<br/>      Press the spacebar to open the field context menu.<br/>      Press Escape to exit inline edit mode.

<?xml version="1.0" encoding="UTF-8"?><xml table="conflict"><item endquery="false" field="" goto="false" newquery="false" operator="=" or="false" value=""/></xml>

Conflicts Detected table. Currently in edit mode. Use the arrow and tab keys to navigate cells. Press enter on a cell to edit the value. Press spacebar to open the menu for a cell. Press escape to exit edit mode.

icon-ellipsis-vertical col-menu list_header_context list-column-icon

Maintenance or Blackout Window that is causing the conflict, if any

Change Request that is in conflict with the scheduled Change Request

Affected CI associated with the Change Request being checked for conflict

var list = GlideList2.get('30282ac1539f12104d8731f0a0490e67');
			list.headerMenu.clear();list.headerMenu.add('41a60a53471331004695d7527c9a7164','41a60a53471331004695d7527c9a7164','d1ad2f010a0a0b3e005c8b7fbd7c4e28','Export Set','action','','500','','false');
    list.headerMenu.add('4777ca1a0a0a0b285aea03289279ca97','4777ca1a0a0a0b285aea03289279ca97','','','line','','1017','','false');
    list.headerMenu.add('5402b80e9fa322005cf3ffa4677fcf10','5402b80e9fa322005cf3ffa4677fcf10','d1ad2f010a0a0b3e005c8b7fbd7c4e28','JSON','action','','350','','false');
    list.headerMenu.add('731a31e7bf460100e628555b3f073957','731a31e7bf460100e628555b3f073957','','','line','','1300','','false');
    list.headerMenu.add('a2c38e980a0a0b3000d5190f4752094c','a2c38e980a0a0b3000d5190f4752094c','','Configure','menu','','1040','','false');
    list.headerMenu.add('ab7f76d70ad33702005f177f6d3a7145','ab7f76d70ad33702005f177f6d3a7145','','Sort (a to z)','action','','1000','','false');
    list.headerMenu.add('ab8369ac0ad337020058ada2a743863a','ab8369ac0ad337020058ada2a743863a','','Sort (z to a)','action','','1010','','false');
    list.headerMenu.add('ab845d300ad33702008cbf08895d727b','ab845d300ad33702008cbf08895d727b','','','line','','1030','','false');
    list.headerMenu.add('ad5756ac0ad3370200d3a60e6710d759','ad5756ac0ad3370200d3a60e6710d759','','','line','','1060','','false');
    list.headerMenu.add('b0b807c087702100deddb882a2e3ece0','b0b807c087702100deddb882a2e3ece0','','Create Application Files','action','','1115','','false');
    list.headerMenu.add('c144403f0a0a0b3e007ef0a823e424a7','c144403f0a0a0b3e007ef0a823e424a7','a2c38e980a0a0b3000d5190f4752094c','','line','','40','','false');
    list.headerMenu.add('c144b37c0a0a0b3e00949d7e31182a94','c144b37c0a0a0b3e00949d7e31182a94','a2c38e980a0a0b3000d5190f4752094c','List Layout','action','','10','','false');
    list.headerMenu.add('c229daa70a0a0b3e00bfd5294a92cb0e','c229daa70a0a0b3e00bfd5294a92cb0e','a2c38e980a0a0b3000d5190f4752094c','List Calculations','action','','20','','false');
    list.headerMenu.add('c28441330a0a0b3e009ac756d9348c5a','c28441330a0a0b3e009ac756d9348c5a','a2c38e980a0a0b3000d5190f4752094c','List Control','action','','30','','false');
    list.headerMenu.add('c8c2eae10a0004e30084537138ba00ed','c8c2eae10a0004e30084537138ba00ed','','Expand/Collapse All','action','','500','','true');
    list.headerMenu.add('d1cd92f20a0a0b3e00b44ff90470380e','d1cd92f20a0a0b3e00b44ff90470380e','d1ad2f010a0a0b3e005c8b7fbd7c4e28','CSV','action','','200','','false');
    list.headerMenu.add('d1ceb4790a0a0b3e0086e9a19b8d9657','d1ceb4790a0a0b3e0086e9a19b8d9657','d1ad2f010a0a0b3e005c8b7fbd7c4e28','XML','action','','300','','false');
    list.headerMenu.add('d1e5d8a50a0a0b3e00459c252c81e649','d1e5d8a50a0a0b3e00459c252c81e649','d1ad2f010a0a0b3e005c8b7fbd7c4e28','PDF','menu','','400','','false');
    list.headerMenu.add('d1e68f410a0a0b3e002c9785414de051','d1e68f410a0a0b3e002c9785414de051','d1e5d8a50a0a0b3e00459c252c81e649','Portrait','action','','100','','false');
    list.headerMenu.add('d1e7d68b0a0a0b3e002f4618e3755d86','d1e7d68b0a0a0b3e002f4618e3755d86','d1e5d8a50a0a0b3e00459c252c81e649','Landscape','action','','200','','false');
    list.headerMenu.add('d1e8971a0a0a0b3e00c9e1fc881affd3','d1e8971a0a0a0b3e00c9e1fc881affd3','d1e5d8a50a0a0b3e00459c252c81e649','Detailed Portrait','action','','300','','false');
    list.headerMenu.add('d1e93cc80a0a0b3e007e913c2485c9e1','d1e93cc80a0a0b3e007e913c2485c9e1','d1e5d8a50a0a0b3e00459c252c81e649','Detailed Landscape','action','','400','','false');
    list.headerMenu.add('f13f0041473012003db6d7527c9a71f0','f13f0041473012003db6d7527c9a71f0','d1ad2f010a0a0b3e005c8b7fbd7c4e28','Excel (.xlsx)','action','','100','','false');
    list.headerMenu.add('f55d57090a0a0b3e00ca9bf67d92fc0e','f55d57090a0a0b3e00ca9bf67d92fc0e','','','line','','1190','','false');
    list.headerMenu.add('1895ef3407201000e8735720e1021eda','data_policies','a2c38e980a0a0b3000d5190f4752094c','Data Policies','action','showDataPolicies(\'model_table=conflict\');','110','','false');
    list.headerMenu.add('330107128f01200072a89cfde0f923c4','ui_actions','a2c38e980a0a0b3000d5190f4752094c','Notifications','action','showUIActions(\'collection=conflict\');','125','','false');
    list.headerMenu.add('3f629b670a0a0bd501d3310795df264a','personalize_all','a2c38e980a0a0b3000d5190f4752094c','All','action','personalizeAll(\'conflict\', \'Conflicts\');','50','','false');
    list.headerMenu.add('463d0a00ff220000dadad1cb127f9dc3','security_rules','a2c38e980a0a0b3000d5190f4752094c','Security Rules','action','showSecurityRules(\'conflict\');','70','','false');
    list.headerMenu.add('96b2f2ebd71231008d7dc23c5e61031f','workflows','a2c38e980a0a0b3000d5190f4752094c','Workflows','action','showWorkflows(\'table=conflict^template=false\');','85','','false');
    list.headerMenu.add('a3a9bf900a0a0b300030941abc7b2697','business_rules','a2c38e980a0a0b3000d5190f4752094c','Business Rules','action','showBusinessRules(\'collection=conflict\');','80','','false');
    list.headerMenu.add('c114e6d10a0a0b3e0032ce8cea45faff','client_scripts','a2c38e980a0a0b3000d5190f4752094c','Client Scripts','action','showClientScripts(\'table=conflict\');','90','','false');
    list.headerMenu.add('c11e69b40a0a0b3e00bd78e48646fb7f','ui_policies','a2c38e980a0a0b3000d5190f4752094c','UI Policies','action','showUIPolicies(\'table=conflict\');','100','','false');
    list.headerMenu.add('c120f2730a0a0b3e00a2cca96313f847','ui_actions','a2c38e980a0a0b3000d5190f4752094c','UI Actions','action','showUIActions(\'table=conflict\');','120','','false');
    list.headerMenu.add('c1228d760a0a0b3e00046e56dbd30d49','dictionary','a2c38e980a0a0b3000d5190f4752094c','Dictionary','action','showDictionary(\'name=conflict\');','130','','false');
    list.headerMenu.add('e4ce64f0c3303000bac1addbdfba8f42','dictionary','a2c38e980a0a0b3000d5190f4752094c','Table','action','showTable(\'conflict\');','60','','false');
    list.headerMenu.add('26a64f613718030003a08fb77e41f193','flow_designer_flows','a2c38e980a0a0b3000d5190f4752094c','Flow Designer Flows','action','showFlows(\'conflict\');','87','','false');
    
g_list_edit_enable_property = 'true';
			g_list_edit_enable = true;
			g_list_edit_double = true;
			g_list_edit_ignore_types = "html,document_id,conditions,template_value,glide_time,currency,price,user_image,video,field_list,domain_number,domain_path,glide_list,glide_action_list,currency2,file_attachment,translated_html";
			g_list_edit_version_2 = "true";
			g_list_edit_grid = "false";addLoadEvent(function() {addUnloadEvent(GlideList2.unload);});

addLoadEvent(function() { GlideList2.get('30282ac1539f12104d8731f0a0490e67').loaded(); });

          if(true == false)
              if(true == false)
                  if(true == true)
                      $j(window).on('load resize', function() {
                          $j('.navbar .list_nav_top').css({position: 'fixed', top: 0});
                      }).resize();

			if (typeof openRL != 'function') {
				openRL = function openRL() {
					return true;
				};
			}
		})();

messages.set('%d ago');
messages.set('%d from now');
messages.set('just now');
messages.set('less than a minute');
messages.set('about a minute','%dm');
messages.set('%d minutes','%dm');
messages.set('about an hour');
messages.set('about %d hours','%dh');
messages.set('a day');
messages.set('%d days','%dd');
messages.set('about a month');
messages.set('%d months','%dmo');
messages.set('about a year');
messages.set('%d years','%dy');
messages.set('(empty)');
messages.set('New row');
messages.set('New rows');
messages.set('Insert a new row...');
messages.set('Mark record for List Action');
messages.set('View');
messages.set('Delete');
messages.set('Undelete');
messages.set('Mark deleted');
messages.set('Loading...');
messages.set('A new {0} identified by {1} will be created upon save');
messages.set('Display / hide hierarchical lists');
messages.set('Show / hide filter');
messages.set('Show / hide natural language filter');
messages.set('Displays previous search result content');
messages.set('Displays Next search result content');
messages.set('Filtered {0} related list showing {1} to {2} of {3} records');
messages.set('Unfiltered {0} related list showing {1} to {2} of {3} records');
messages.set('Filtered {0} related list showing 0 records');
messages.set('Unfiltered {0} related list showing 0 records');
messages.set('Filtered {0} list showing {1} to {2} of {3} records');
messages.set('Unfiltered {0} list showing {1} to {2} of {3} records');
messages.set('Filtered {0} list showing 0 records');
messages.set('Unfiltered {0} list showing 0 records');
messages.set('from','From');
messages.set('Coordinates');
messages.set('Convert value to a different unit');
})()

			if (typeof window.Table === "undefined") {
				return;
			}
			window.Table.setColumns('conflict', null, '\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\u003Cxml label=\"Conflict\">\u003Cadd_all_and_none_options/>\u003Citem adp_encrypted=\"no\" attributes=\"encode_utf8=false\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Affected CI\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Affected CI\" max_length=\"32\" refdisplay=\"name\" reference=\"cmdb_ci\" reference_key=\"\" reference_qual=\"\" reference_rotated=\"no\" reference_sharded=\"no\" reflabel=\"Configuration Item\" table=\"conflict\" title=\"Affected CI associated with the Change Request being checked for conflict\" type=\"reference\" value=\"configuration_item\"/>\u003Citem adp_encrypted=\"no\" attributes=\"encode_utf8=false\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Change\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Change\" max_length=\"32\" refdisplay=\"number\" reference=\"change_request\" reference_key=\"\" reference_qual=\"\" reference_rotated=\"no\" reference_sharded=\"no\" reflabel=\"Change Request\" table=\"conflict\" title=\"Change Request being checked for conflicts\" type=\"reference\" value=\"change\"/>\u003Citem adp_encrypted=\"no\" attributes=\"encode_utf8=false\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Conflicting change\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Conflicting change\" max_length=\"32\" refdisplay=\"number\" reference=\"change_request\" reference_key=\"\" reference_qual=\"\" reference_rotated=\"no\" reference_sharded=\"no\" reflabel=\"Change Request\" table=\"conflict\" title=\"Change Request that is in conflict with the scheduled Change Request\" type=\"reference\" value=\"conflicting_change\"/>\u003Citem adp_encrypted=\"no\" attributes=\"edge_encryption_enabled=true\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Created\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Created\" max_length=\"40\" table=\"conflict\" title=\"\" type=\"glide_date_time\" value=\"sys_created_on\"/>\u003Citem adp_encrypted=\"no\" attributes=\"edge_encryption_enabled=true\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Created by\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Created by\" max_length=\"40\" table=\"conflict\" title=\"\" type=\"string\" value=\"sys_created_by\"/>\u003Citem adp_encrypted=\"no\" attributes=\"encode_utf8=false\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Impacted Service\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Impacted Service\" max_length=\"32\" refdisplay=\"name\" reference=\"cmdb_ci_service\" reference_key=\"\" reference_qual=\"\" reference_rotated=\"no\" reference_sharded=\"no\" reflabel=\"Service\" table=\"conflict\" title=\"\" type=\"reference\" value=\"impacted_service\"/>\u003Citem adp_encrypted=\"no\" attributes=\"edge_encryption_enabled=true\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Last checked\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Last checked\" max_length=\"40\" table=\"conflict\" title=\"When the parent Change Request was last checked for conflicts\" type=\"glide_date_time\" value=\"last_checked\"/>\u003Citem adp_encrypted=\"no\" attributes=\"encode_utf8=false\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Related CI\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Related CI\" max_length=\"32\" refdisplay=\"name\" reference=\"cmdb_ci\" reference_key=\"\" reference_qual=\"\" reference_rotated=\"no\" reference_sharded=\"no\" reflabel=\"Configuration Item\" table=\"conflict\" title=\"Parent or Child CI of the current CI, if it has caused a conflict\" type=\"reference\" value=\"related_configuration_item\"/>\u003Citem adp_encrypted=\"no\" attributes=\"encode_utf8=false\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Schedule\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Schedule\" max_length=\"32\" refdisplay=\"name\" reference=\"cmn_schedule\" reference_key=\"\" reference_qual=\"\" reference_rotated=\"no\" reference_sharded=\"no\" reflabel=\"Schedule\" table=\"conflict\" title=\"Maintenance or Blackout Window that is causing the conflict, if any\" type=\"reference\" value=\"schedule\"/>\u003Citem adp_encrypted=\"no\" attributes=\"\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Sys ID\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Sys ID\" max_length=\"32\" table=\"conflict\" title=\"\" type=\"GUID\" value=\"sys_id\"/>\u003Citem adp_encrypted=\"no\" attributes=\"can_group=true,no_audit=true,serializer=com.glide.script.OmittedElementXMLSerializer\" canmatch=\"no\" canread=\"yes\" cansort=\"no\" cansorti18n=\"no\" canwrite=\"yes\" choice=\"0\" cl=\"Tags\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Tags\" max_length=\"0\" table=\"conflict\" title=\"\" type=\"related_tags\" value=\"sys_tags\"/>\u003Citem adp_encrypted=\"no\" attributes=\"edge_encryption_enabled=true\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"1\" cl=\"Type\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Type\" max_length=\"40\" table=\"conflict\" title=\"Issue which caused the conflict\" type=\"string\" value=\"type\"/>\u003Citem adp_encrypted=\"no\" attributes=\"edge_encryption_enabled=true\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Updated\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Updated\" max_length=\"40\" table=\"conflict\" title=\"\" type=\"glide_date_time\" value=\"sys_updated_on\"/>\u003Citem adp_encrypted=\"no\" attributes=\"edge_encryption_enabled=true\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Updated by\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Updated by\" max_length=\"40\" table=\"conflict\" title=\"\" type=\"string\" value=\"sys_updated_by\"/>\u003Citem adp_encrypted=\"no\" attributes=\"\" canmatch=\"yes\" canread=\"yes\" cansort=\"yes\" cansorti18n=\"yes\" canwrite=\"yes\" choice=\"0\" cl=\"Updates\" dependent=\"\" display_chars=\"40\" dynamic_creation=\"false\" edge_encrypted=\"no\" filterable=\"yes\" glide_encrypted=\"no\" label=\"Updates\" max_length=\"40\" table=\"conflict\" title=\"\" type=\"integer\" value=\"sys_mod_count\"/>\u003Cextensions/>\u003Csys_choice_extensions/>\u003Ctables table_list=\"conflict\"/>\u003C/xml>');
		});

addRenderEvent(function() {
			editListRegisterOnSubmit('30282ac1539f12104d8731f0a0490e67');
		});

control-label col-xs-12 col-md-3 col-lg-4  col-xs-12 col-md-3 col-lg-4 control-label

glideListPopupSelection(event, 'change_request.watch_list', 'sys_user')

addUnloadEvent(function() {
			var element = gel("sys_display.change_request.watch_list");
			if (element && element.ac) {
				if (element.ac.destroy) 
					element.ac.destroy();
				}
		});

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.watch_list'); if (!e.ac) { var ac = new AJAXReferenceCompleter(gel('sys_display.change_request.watch_list'), 'change_request.watch_list', 'null', ''); ac.setAdditionalValue('sysparm_ref_override', 'sys_user');}})

return acReferenceKeyUp(this, event);refFlipImage(this, 'change_request.watch_list');

return emailInputKeyPress(event, 'select_0change_request.watch_list', this, 'Email address is invalid');

addEmailAddressToList('select_0change_request.watch_list', gel('text.value.change_request.watch_list'), 'Email address is invalid'); event.stop();

addRenderEvent(function () {
						glideListInit('select_0change_request.watch_list', 'change_request.watch_list', 'sys_user');
			})

if(navigator.userAgent.match(/iPad/i)) {
			var fixIpadMultiselect = function() {
				$j('select[multiple]').iosmultiselect();
			}
			addLoadEvent(function() {
				if($j && $j.fn) {
					if($j.fn.iosmultiselect){
						fixIpadMultiselect();
					} else {
						var scriptId = "iosMultiselectPlugin";
						var scriptTag = document.getElementById(scriptId);
						if (!scriptTag) {
							var ref = document.getElementsByTagName( "script" )[ 0 ];
							var script = document.createElement( "script" );
							script.id = scriptId;
							script.async = true;
							ref.parentNode.insertBefore( script, ref );
							script.onload = fixIpadMultiselect;
							script.src = 'scripts/lib/jquery.iosmultiselect.js';
						}
					}
						
				}
			});
		}

glideListPopupSelection(event, 'change_request.work_notes_list', 'sys_user')

			var element = gel("sys_display.change_request.work_notes_list");
				}
		});

if (!this.ac) addLoadEvent(function() {var e = gel('sys_display.change_request.work_notes_list'); if (!e.ac) { var ac = new AJAXReferenceCompleter(gel('sys_display.change_request.work_notes_list'), 'change_request.work_notes_list', 'null', ''); ac.setAdditionalValue('sysparm_ref_override', 'sys_user');}})

return acReferenceKeyUp(this, event);refFlipImage(this, 'change_request.work_notes_list');

return emailInputKeyPress(event, 'select_0change_request.work_notes_list', this, 'Email address is invalid');

addEmailAddressToList('select_0change_request.work_notes_list', gel('text.value.change_request.work_notes_list'), 'Email address is invalid'); event.stop();

						glideListInit('select_0change_request.work_notes_list', 'change_request.work_notes_list', 'sys_user');
			})

					textareaResize('change_request.comments');
			}
		);

					textareaResize('change_request.work_notes');
			}
		);

overflow: hidden; background-color: RGB(var(--now-color_alert--warning-0, 250,250,210)); overflow-wrap: break-word; resize: none;

custom-form-group is-wide activity-form-group  form-group ng-scope

            var $ = jQuery.noConflict();
			var streamId = "b8282ac18b9f12103b05eb37b7347267";
			var selector = '[sn-stream-container]';
			if (streamId) {
				selector +=  '[stream-id="' + streamId + '"]';
			}

            $(function() {
                $(selector).on('click', 'ul .stream-action', function(e) {
                    e.stopPropagation();
                    var t = $(e.currentTarget);
                    switch (t.attr('action-type')) {
                        case 'show-more':
                            triggerShowMore(t);
                            break;

                        case 'show-less':
                            getEntryTextBlock(t).removeClass('state-expanded');
                            t.attr('action-type', 'show-more');
                            swapMoreActionLabel(t);
                            break;

                        case 'show-all':
                            var sysId = t.attr('sys-id');
                            var isHtml = t.attr('is-html') === 'true';

                            $.get('/api/now/ui/stream_entry/full_entry?sysparm_sys_id=' + sysId).then(function(response) {
                                if (!response) {
                                    return;
                                }
                                if (response.result) {
                                    var body = getFormattedBody(response.result);
                                    if(isHtml)
                                        encapsulate('journal-content_' + sysId, body);
                                    else
                                        getEntryTextBlockBody(t).html(body);
                                    t.hide();
                                    var $more = getMoreAction(t);
                                    triggerShowMore($more);
                                    $more.show();
                                }
                            });
                            break;

						case 'attachment-image-handler':
							var state = t.attr('state');
							var isSmallerImage = t.attr('is-small') === 'true';
							if (state === 'not_available') {
								e.preventDefault();
								showAttachmentUnavailableMsg(t.attr('file-name'));
							} else if (state === 'available' || !window.NOW.attachmentAdviceRequired) {
								if (isSmallerImage) {
									e.preventDefault();
									showImageModal(t);
								}
							} else {
								getAttachmentAvailability(t,
									function successCallback() {
										if (isSmallerImage) {
											t.children().toggle();
										} else {
											downloadAttachment(t);
										}
									}
								);
							}
							break;

						case 'attachment-video-handler':
							e.preventDefault();
							if (state === 'available' || !window.NOW.attachmentAdviceRequired) {
								playVideo(t);
							} else if (state === 'not_available') {
							} else {
								getAttachmentAvailability(t, playVideo);
							}
							break;

						case 'attachment-default-handler':
								return;
							} else {
								getAttachmentAvailability(t, downloadAttachment);
							}
							break;

						case 'show-attachment-unavailable':
							showAttachmentUnavailableMsg(t.attr('file-name'))
							break;

                        case 'email-stream-response':
                            e.preventDefault();
                            openEmailStreamResponseWindow(t);
                            break;

                        case 'show-email':
                            var $email = getEntryEmailBlock(t);
                            addEntryEmailPreview(t);
                            $email.show();
                            t.attr('action-type', 'hide-email');
                            break;

                        case 'hide-email':
                            getEntryEmailBlock(t).hide();
                            getEntryEmailTextBlock(t).html('');
                            t.attr('action-type', 'show-email');
                            break;
                    }
                });

				function setAttachmentState($el, state) {
					$el.attr('state',state);
					if (state === 'not_available') {
						if ($el.attr('action-type') === 'attachment-image-handler') {
							$el.find('p').append(' [unavailable]')
						} else {
							$el.append(' [unavailable]')
						}
						$el.parent().addClass('sn-card-attachment-unavailable');
					}
				}

				function getAttachmentAvailability($el, sucessFn) {
					var attachmentSysId = $el.attr('sys-id');
					$.get('/api/now/as_attachment/getAvailability/' + attachmentSysId)
						.then(function(response) {
							if (response.result) {
								setAttachmentState($el,response.result.availability);
								if (response.result.availability === 'available') {
									sucessFn($el);
								} else {
									showAttachmentUnavailableMsg($el.attr('file-name'), response.result.message);
								}
							} else {
								
								downloadAttachment($el);
							}
						}, function() {
							downloadAttachment($el);
						});
				}

				function showAttachmentUnavailableMsg(fileName, customMsg) {
					if (typeof g_form === "undefined")
						return;

					customMsg = customMsg || 'The file <b>{0}</b>did not pass security scan and cannot be downloaded'
									.replace('{0}', fileName.escapeHTML() + ' ');
					g_form.addErrorMessage(customMsg);
				}

				function downloadAttachment($el) {
					var link = document.createElement('a');
					link.href = $el.attr('href');
					link.download = $el.attr('file-name');
					var event = (typeof window.MouseEvent === "function")
									? new MouseEvent("click")
									: document.createEvent('Event');
					event.initEvent('click', true, true);
					link.dispatchEvent(event);
				}

				function playVideo($el) {
					$el.siblings().show();
					$el.hide();
					$el.parent().find('video')[0].play();
				}

				function showImageModal($el) {
					CustomEvent.fire('sn.attachment.preview', event, {
						sys_id: $el.attr('sys-id'),
						file_name: $el.attr('file-name'),
						size: $el.attr('size')
					});
				}

				function triggerShowMore($el) {
					getEntryTextBlock($el).addClass('state-expanded');
					$el.attr('action-type', 'show-less');
					swapMoreActionLabel($el);
				}

                function swapMoreActionLabel($el) {
                    var newLabel = $el.attr('show-label');
                    $el.attr('show-label', $el.text());
                    $el.text(newLabel);
                }

                function getMoreAction($el) {
                    return $el.parents('.sn-card-component_summary').find('.stream-action-show-more');
                }

                function getEntryEmailBlock($el) {
                    return $el.parents('.sn-card-component_records').siblings('.sn-card-component_summary');
                }

                function getEntryEmailTextBlock($el) {
                    return getEntryEmailBlock($el).find('.sn-widget-textblock');
                }

                function addEntryEmailPreview($el) {
                    var $body = getEntryEmailTextBlock($el);
                    var $frame = $(document.createElement('iframe'));
                    $frame.addClass('card');
					$frame.addClass('activity-stream-email-iframe');
					$frame.attr('title', 'Email body');
                    $frame.css('width', '100%');
                    $frame.attr('src', $el.attr('href'));
                    $body.append($frame);
                    $frame.on('load', function() {
                        var bodyHeight = $frame.contents().find('html').outerHeight();
                        $frame.height(bodyHeight);
                    });
                }

                function openEmailStreamResponseWindow(t) {
                    if (typeof window.nowapi === "undefined" ||
                        typeof window.nowapi.GlideURLBuilder === "undefined" ||
                        typeof window.nowapi.g_navigation === "undefined") {
                        return;
                    }
                    var table = t.attr('table');
                    var url = window.nowapi.GlideURLBuilder.newGlideUrl('email_client.do');
                    url.addParam('sysparm_table', table);
                    url.addParam('sysparm_target', table);
                    url.addParam('sysparm_sys_id', t.attr('sys-id'));
                    url.addParam('replytype', t.attr('reply-type'));
                    url.addParam('replyid', t.attr('reply-id'));
                    var popupURL = url.getURL();
                    if (typeof g_form !== "undefined") {
                        popupURL += g_form.serializeChangedAll();
                    }
                    var features = "width=875,height=575,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollbars=1";
                    var win = window.nowapi.g_navigation.openPopup(popupURL, "Email_Client", features);
                }

                function getEntryTextBlock($el) {
                    return $el.parents('.sn-card-component_summary').find('.sn-widget-textblock');
                }

                function getEntryTextBlockBody($el) {
                    return $el.parents('.sn-card-component_summary').find('.sn-widget-textblock-body');
                }

                function getFormattedBody(s) {
                    return s.replace(/\r?\n/g, '<br>');
                }
            });
        })();

onChange('change_request.close_code', arguments.length === 2 ? arguments[1] : false);telemetryForRecordUpdate('close_code');

    	var element = document.getElementById('change_request.close_code');
			}
		}
    }

					textareaResize('change_request.close_notes');
			}
		);

									if(!g_form.elementHandlers['change_request.close_notes']) {
										g_form.registerHandler('change_request.close_notes', new TextAreaElement('change_request.close_notes'));
									}
								}
								});
							}

var g_scratchpad = JSON.parse('{\"browserSupported\":true,\"change_model\":{\"available_states\":[\"-5\",\"-4\",\"4\"],\"field\":\"state\",\"field_choices\":{\"-1\":{\"label\":\"Implement\",\"order\":4,\"value\":\"-1\"},\"-2\":{\"label\":\"Scheduled\",\"order\":3,\"value\":\"-2\"},\"-3\":{\"label\":\"Authorize\",\"order\":2,\"value\":\"-3\"},\"-4\":{\"label\":\"Assess\",\"order\":1,\"value\":\"-4\"},\"-5\":{\"label\":\"New\",\"order\":0,\"value\":\"-5\"},\"0\":{\"label\":\"Review\",\"order\":5,\"value\":\"0\"},\"3\":{\"label\":\"Closed\",\"order\":6,\"value\":\"3\"},\"4\":{\"label\":\"Canceled\",\"order\":7,\"value\":\"4\"}},\"hidden\":false,\"initial_state\":\"-5\",\"record_preset\":{\"type\":{\"displayValue\":\"Normal\",\"value\":\"normal\"}}},\"flowData\":{\"flowId\":\"\",\"flowQuery\":\"\",\"hasFlows\":false,\"hasMultipleFlows\":false},\"isNewUI\":true,\"show_conflict_message\":{\"preference\":true,\"property\":\"user\"}}');addRenderEvent(function() {
					g_form.addSecurityReadOnlyFields('change_request.conflict_status,change_request.conflict_last_run,');
				});

				// update CSRF token for form
				CustomEvent.observe("ck_updated", function(ck) {
					$j('input[name=sysparm_ck]').val(ck);
				});

if (!window['g_form'])
 window.g_form = new GlideForm('change_request',true,true,true,true);

 g_form.setScope('global');

addTopRenderEvent( function() { 
var thisForm = gel('change_request.do');
g_form.addAttribute('contextual_security');
addOnSubmitEvent(thisForm, default_on_submit);
});

 var glideUIElement = newGlideUIElement('change_request', 'end_date', 'glide_date_time',false, 'null',null, 'global', false, false);
 glideUIElement.isInherited = false;
 glideUIElement.supportsMapping = false;
 g_form.addGlideUIElement(glideUIElement);
 var glideUIElement = newGlideUIElement('change_request', 'short_description', 'string',false, 'null',null, 'global', false, false);
 glideUIElement.isInherited = true;
 var glideUIElement = newGlideUIElement('change_request', 'work_start', 'glide_date_time',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'close_code', 'string',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'assignment_group', 'reference',false, 'sys_user_group',null, 'global', false, false);
 glideUIElement.referenceKey = 'sys_id';
 var glideUIElement = newGlideUIElement('change_request', 'backout_plan', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'watch_list', 'glide_list',false, 'sys_user',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'description', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'on_hold_reason', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'type', 'string',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'service_offering', 'reference',false, 'service_offering',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'conflict_status', 'string',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'close_notes', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'number', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'test_plan', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'cab_delegate', 'reference',false, 'sys_user',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'cab_required', 'boolean',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'state', 'integer',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'justification', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'assigned_to', 'reference',false, 'sys_user',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'start_date', 'glide_date_time',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'comments', 'journal_input',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'cmdb_ci', 'reference',false, 'cmdb_ci',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'approval', 'string',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'impact', 'integer',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'work_notes_list', 'glide_list',false, 'sys_user',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'business_service', 'reference',false, 'cmdb_ci_service',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'on_hold', 'boolean',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'priority', 'integer',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'chg_model', 'reference',false, 'chg_model',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'cab_recommendation', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'conflict_last_run', 'glide_date_time',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'cab_date_time', 'glide_date_time',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'requested_by', 'reference',false, 'sys_user',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'work_end', 'glide_date_time',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'unauthorized', 'boolean',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'risk', 'integer',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'category', 'string',false, 'null',null, 'global', true, false);
 var glideUIElement = newGlideUIElement('change_request', 'work_notes', 'journal_input',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'implementation_plan', 'string',false, 'null',null, 'global', false, false);
 var glideUIElement = newGlideUIElement('change_request', 'risk_impact_analysis', 'string',false, 'null',null, 'global', false, false);
 g_form.addGlideUIElement(glideUIElement);function validate_integer(value) { 
    if(!containsOnlyChars( g_user_grouping_separator + " 0123456789-", value))
        return new GwtMessage().getMessage("Invalid integer");
    return true;
}
 g_form.addValidator('integer', validate_integer);function validate_glide_date_time(value) {
    // empty fields are still valid dates
    if(!value)
        return true;

    // We "should" have the global date format defined always defined. but there's always that edge case...
    if(typeof g_user_date_time_format !== 'undefined')
        return isDate(value, g_user_date_time_format) ? true : new GwtMessage().getMessage("Invalid Date: {0}. Must be a valid date in the format {1}", value, g_user_date_time_format);

    // if we don't have that defined, we can always try guessing
    return parseDate(value) !== null ? true : getMessage("Invalid Date");
	
} 
 g_form.addValidator('glide_date_time', validate_glide_date_time);

		addTopRenderEvent( function() {
			// user may have already been created
			if (!window.g_user) {
				window.g_user = new GlideUser('Samuel.Johnson.9662', 
					  'Samuel',
					  'Johnson',
					  'platform_ml_create,import_transformer,taxonomy_admin,ais_admin,catalog_builder_editor,nlu_admin,catalog,catalog_template_editor,catalog_lookup_admin,admin,ml_admin,platform_ml_read,platform_ml_write,chat_admin,search_application_admin,search_relevancy_model_admin,import_set_loader,catalog_admin,sn_ace.ace_user,import_scheduler,pa_viewer,nlu_editor,sn_templated_snip.template_snippet_admin,sn_hr_sp.esc_admin,nlu_user,personalize_dictionary,live_feed_admin,sn_hr_sp.admin,sn_templated_snip.template_snippet_writer,evam_admin,ml_labeler,sp_admin,import_admin,pa_data_collector,announcement_admin,sn_templated_snip.template_snippet_reader,user_criteria_admin,image_admin,sn_employee.admin,sn_nlu_workbench.nlu_feedback_admin',
					  '5e1826c1539f12104d8731f0a0490e94',
					  '');
				window.g_user.setRoles('platform_ml_create,import_transformer,taxonomy_admin,ais_admin,catalog_builder_editor,nlu_admin,catalog,catalog_template_editor,catalog_lookup_admin,admin,ml_admin,platform_ml_read,platform_ml_write,chat_admin,search_application_admin,search_relevancy_model_admin,import_set_loader,catalog_admin,sn_ace.ace_user,import_scheduler,pa_viewer,nlu_editor,sn_templated_snip.template_snippet_admin,sn_hr_sp.esc_admin,nlu_user,personalize_dictionary,live_feed_admin,sn_hr_sp.admin,sn_templated_snip.template_snippet_writer,evam_admin,ml_labeler,sp_admin,import_admin,pa_data_collector,announcement_admin,sn_templated_snip.template_snippet_reader,user_criteria_admin,image_admin,sn_employee.admin,sn_nlu_workbench.nlu_feedback_admin', true);
			}
		    
		    // We want to preload all useful client preferences that will be used by the UI. At the moment
		    // we have to do this manually, but this should be replaced by a dynamic list.
		    window.g_user.setPreference('glide.ui.accessibility', 'false');
		});
	
addRenderEvent( function() { var thisForm = document.getElementById('change_request.do');var onSubmit71234105535712104d8731f0a0490ee6 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
 "use strict"; 
function onSubmit71234105535712104d8731f0a0490ee6() {
	if (g_form.isNewRecord() && g_scratchpad.hasOwnProperty("standardChange") && g_scratchpad.standardChange.hasOwnProperty("preventInactiveInsert")) {
		if (g_scratchpad.standardChange.preventInactiveInsert === true && g_scratchpad.standardChange.stdChangeTemplateActive === false) {
			g_form.clearMessages();
			var translatedMsg = getMessage("Change Requests cannot be created from an inactive Standard Change Template");
			g_form.addErrorMessage(translatedMsg + ": " + g_scratchpad.standardChange.stdChangeTemplateName);
			return false;
		}
	}
	return true;
}

 return onSubmit71234105535712104d8731f0a0490ee6.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
addOnSubmitEvent(thisForm, onSubmit71234105535712104d8731f0a0490ee6,'onSubmit71234105535712104d8731f0a0490ee6');
});
g_event_handlers_onSubmit['onSubmit71234105535712104d8731f0a0490ee6'] = 'Prevent submit for inactive Std Change';
g_event_handler_ids['onSubmit71234105535712104d8731f0a0490ee6'] = '6a2c627bb7032010dff9fa13ee11a99d';
var messages = new GwtMessage();messages.set('Change Requests cannot be created from an inactive Standard Change Template');
addRenderEvent( function() { var thisForm = document.getElementById('change_request.do');function onSubmitb1234105535712104d8731f0a0490ee6() {
    var startDate = g_form.getValue("start_date");
    var endDate = g_form.getValue("end_date");
    var format = g_user_date_time_format;
    if (startDate === "" || endDate === "")
    var startDateMs = getDateFromFormat(startDate, format);
	var endDateMs = getDateFromFormat(endDate, format);
	
	if (startDateMs < endDateMs)
		return true;
	g_form.clearMessages();
	
	if (startDateMs === 0 || endDateMs === 0) {
        if (startDate === 0)
            g_form.addErrorMessage(new GwtMessage().getMessage("{0} is invalid", g_form.getLabelOf("start_date")));
        if (endDate === 0)
            g_form.addErrorMessage(new GwtMessage().getMessage("{0} is invalid", g_form.getLabelOf("end_date")));
        return false;
    }
	if (startDateMs > endDateMs) {
        g_form.addErrorMessage(new GwtMessage().getMessage("{0} must be after {1}", g_form.getLabelOf("end_date"), g_form.getLabelOf("start_date")));
    }
if (typeof validateMaxDateDuration !== "undefined") {
		return validateMaxDateDuration("start_date", "end_date", function(msg) {
			g_form.addErrorMessage(msg);
		});
	}
}

addOnSubmitEvent(thisForm, onSubmitb1234105535712104d8731f0a0490ee6,'onSubmitb1234105535712104d8731f0a0490ee6');
});
g_event_handlers_onSubmit['onSubmitb1234105535712104d8731f0a0490ee6'] = 'Planned Start/End Date Validation';
g_event_handler_ids['onSubmitb1234105535712104d8731f0a0490ee6'] = 'a99629f8ef011100521155aef5c0fb72';

addRenderEvent( function() { var thisForm = document.getElementById('change_request.do');function onSubmitf1234105535712104d8731f0a0490ee6() {
	var showErrorMsg = function(errorMsg){
		g_form.clearMessages();
		g_form.addErrorMessage(errorMsg);
	};
	if (typeof validateStartDateBeforeEndDate === "function")
		return validateStartDateBeforeEndDate("work_start", "work_end", showErrorMsg);
}

addOnSubmitEvent(thisForm, onSubmitf1234105535712104d8731f0a0490ee6,'onSubmitf1234105535712104d8731f0a0490ee6');
});
g_event_handlers_onSubmit['onSubmitf1234105535712104d8731f0a0490ee6'] = 'Actual Start/End Dates Validation';
g_event_handler_ids['onSubmitf1234105535712104d8731f0a0490ee6'] = 'd530443367a222004792adab9485ef7b';

g_event_handlers_onLoad['onLoad_75234105535712104d8731f0a0490ee6'] = 'Show/hide "CAB Date" fields';
g_event_handler_ids['onLoad_75234105535712104d8731f0a0490ee6'] = '1ce72f0273fe0110491d235f04f6a770';
function onLoad_75234105535712104d8731f0a0490ee6() {
	var isVisibleFuncName = typeof g_form.isFieldVisible === "function" ? "isFieldVisible" : "isVisible";
	if (!(g_form[isVisibleFuncName]("cab_date") && g_form[isVisibleFuncName]("cab_date_time")))
		return;
	var showNewCABDateField = false;
	if (g_form.getValue("cab_date_time") !== "" || g_form.getValue("cab_date") === "")
		showNewCABDateField = true;
	g_form.setDisplay("cab_date", !showNewCABDateField);
	g_form.setDisplay("cab_date_time", showNewCABDateField);
}

addRenderEventLogged(onLoad_75234105535712104d8731f0a0490ee6, 'onLoad Show/hide "CAB Date" fields','onLoad_75234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_b5234105535712104d8731f0a0490ee6'] = 'calcReturn';
g_event_handler_ids['onLoad_b5234105535712104d8731f0a0490ee6'] = '2bf56855a9fe156100d09e8a53b63ea9';
function onLoad_b5234105535712104d8731f0a0490ee6() {
}

function calcReturn0(response, args) {
   var answer = response.responseXML.documentElement.getAttribute("answer");
   var array = new Array();
   array.push(args);
   calcReturn(answer, response, array);
}

function calcReturn(answer, response, args) {
   var controlName = args[0];
   var myControl = g_form.getControl(controlName);
   var label = "nolabel";
   var value = answer
   if (answer && answer.indexOf("|") > -1) {
      var parts = answer.split("|");
      value = parts[0];
      label = parts[1];
   }
   g_form.setValue(controlName, value, label);
}

addRenderEventLogged(onLoad_b5234105535712104d8731f0a0490ee6, 'onLoad calcReturn','onLoad_b5234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_f5234105535712104d8731f0a0490ee6'] = 'Hide related lists';
g_event_handler_ids['onLoad_f5234105535712104d8731f0a0490ee6'] = '3c4e328fc31102004e44dccdf3d3aee9';
function onLoad_f5234105535712104d8731f0a0490ee6() {
	if (g_scratchpad.browserSupported && g_scratchpad.isNewUI)
		g_form.hideRelatedList("REL:8f576281c3100200e280dccdf3d3aed8");
}

addRenderEventLogged(onLoad_f5234105535712104d8731f0a0490ee6, 'onLoad Hide related lists','onLoad_f5234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_39234105535712104d8731f0a0490ee6'] = 'Hide/Reveal Change variables';
g_event_handler_ids['onLoad_39234105535712104d8731f0a0490ee6'] = '4f47a7e8c0a8000500633dd9f32d81ea';
var g_cat_form = null;
function onLoad_39234105535712104d8731f0a0490ee6() {
  var cat = g_form.getValue('category');
  if (cat != 'Server Reboot' && cat != 'Database Restore' && cat != 'DNS Change')
     return;

  var map = gel('variable_map');
  var cat_form = new ServiceCatalogForm('ni', true, true);

  var items = map.getElementsByTagName("item");
  for (var i = 0; i < items.length; i++) {
  	var item = items.item(i); 
	var name = item.getAttribute('qname');
	var id = item.id;
        var nm = new NameMapEntry(name, "ni.QS" + id);
        cat_form.addNameMapEntry(nm);
  } 
  
  var reason = cat_form.getControl('reason');
  if (!reason)
    return;

  var reason_detail = cat_form.getControl('reason_details');
  if (!reason_detail)
    return;

  g_cat_form = cat_form;
  setReasonVisibility(null, reason);
  var els = document.getElementsByName(reason.name);
  for (var i = 0; i < els.length; i++)
    els[i].onclick = setReasonVisibility.bindAsEventListener(els[i]);
 
}

function setReasonVisibility(e, target) {
   jslog('setReasonVisibility');
   if (!e)
      e = window.event;
	
   if (!target)    
      target = e.target ? e.target : e.srcElement;
   
   var vis = false;
   if (target.value == 'other')
     vis = true;
   
   g_cat_form.setDisplay('reason_details', vis);
}

addRenderEventLogged(onLoad_39234105535712104d8731f0a0490ee6, 'onLoad Hide/Reveal Change variables','onLoad_39234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_79234105535712104d8731f0a0490ee6'] = 'Load Next Available Time script';
g_event_handler_ids['onLoad_79234105535712104d8731f0a0490ee6'] = '8d094d6d732023008ef62d2b04f6a7eb';
function onLoad_79234105535712104d8731f0a0490ee6() {
   ScriptLoader.getScripts('FormNextAvailableTime.jsdbx', function() {});
}

addRenderEventLogged(onLoad_79234105535712104d8731f0a0490ee6, 'onLoad Load Next Available Time script','onLoad_79234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_b9234105535712104d8731f0a0490ee6'] = 'Modify Comments Label';
g_event_handler_ids['onLoad_b9234105535712104d8731f0a0490ee6'] = '8e3c775a0a0a3c74010bedda85570a82';
function onLoad_b9234105535712104d8731f0a0490ee6() {
	if (!g_user.hasRole("itil"))
		return;
	if (!g_form.hasField('comments'))
		return;
	var labelText = g_form.getLabelOf('comments');
	if (labelText.substring(labelText.length-1) == ':')
		labelText = labelText.substring(0, labelText.length -1);
	labelText += new GwtMessage().getMessage(' (Customer visible)');
	g_form.setLabelOf('comments', labelText);
}

addRenderEventLogged(onLoad_b9234105535712104d8731f0a0490ee6, 'onLoad Modify Comments Label','onLoad_b9234105535712104d8731f0a0490ee6');

var messages = new GwtMessage();messages.set('Customer visible');
g_event_handlers_onLoad['onLoad_f9234105535712104d8731f0a0490ee6'] = 'Hide Date Message if Empty';
g_event_handler_ids['onLoad_f9234105535712104d8731f0a0490ee6'] = '9ad6104767f222004792adab9485ef4f';
function onLoad_f9234105535712104d8731f0a0490ee6() {
	if (changeRequestDateMsg.empty())
		changeRequestDateMsg.parentNode.hide();
}

addRenderEventLogged(onLoad_f9234105535712104d8731f0a0490ee6, 'onLoad Hide Date Message if Empty','onLoad_f9234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_3d234105535712104d8731f0a0490ee6'] = 'Date Validation Load';
g_event_handler_ids['onLoad_3d234105535712104d8731f0a0490ee6'] = 'e7fa487767a222004792adab9485efaa';
function onLoad_3d234105535712104d8731f0a0490ee6() {
   ScriptLoader.getScripts('StartEndDateValidation.jsdbx', function() {});
}

addRenderEventLogged(onLoad_3d234105535712104d8731f0a0490ee6, 'onLoad Date Validation Load','onLoad_3d234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_7d234105535712104d8731f0a0490ee6'] = 'Change Model: Reusables';
g_event_handler_ids['onLoad_7d234105535712104d8731f0a0490ee6'] = 'da23f4da53e3101034d1ddeeff7b1237';
addRenderEventLogged(function() {
var onLoad_7d234105535712104d8731f0a0490ee6 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onLoad_7d234105535712104d8731f0a0490ee6() {
	if (!g_scratchpad.change_model)
		return;
	var model = g_scratchpad.change_model;
	model.updateStates = function(resetToInitialState) {
		var model = g_scratchpad.change_model;
		var fieldValue = g_form.getValue(model.field);
		g_form.clearOptions(model.field);
		if (!model.available_states || !model.available_states.length)
			return;
		model.available_states.forEach(function(state) {
			var choice = model.field_choices[state + ""];
			if (!choice) {
				g_form.addOption(model.field, state, state);
				return;
			}
			g_form.addOption(model.field, choice.value, choice.label);
		});
		if (model.available_states.indexOf(fieldValue) === -1 || resetToInitialState) {
			g_form.setValue(model.field, model.initial_state);
			return;
		}
		if (Object.keys(model.field_choices).indexOf(fieldValue) === -1)
			g_form.addOption(model.field, fieldValue, fieldValue);
		g_form.setValue(model.field, fieldValue);
	};
	model.updatePresets = function() {
		Object.keys(model.record_preset).forEach(function(field) {
			if (field === 'EQ' || field === 'chg_model')
				return;
			g_form.setValue(field, model.record_preset[field].value, model.record_preset[field].displayValue);
		});
	};
	model.setPresetsReadOnly = function(readOnly) {
			if (field === 'chg_model')
				return;
			g_form.setReadOnly(field, readOnly);
		});
	};
	model.refreshModel = function(refreshedElements) {
		if (!refreshedElements)
			return;
		Object.keys(refreshedElements).forEach(function(key) {
			model[key] = refreshedElements[key];
		});
	};
	model.hide = function() {
		if (g_scratchpad.change_model.hidden)
			g_form.setDisplay("chg_model", false);
	};
	model.readOnlyIfNotInitial = function() {
		if (g_form.getValue(model.field) + '' !== model.initial_state + '')
			g_form.setReadOnly('chg_model', true);
	};
	model.requestRefreshUpdateModel = function() {
		var ga = new GlideAjax('ChangeModelAJAXProcessor');
		ga.addParam("sysparm_name", "getModel");
		ga.addParam("sysparm_table", g_form.getTableName());
		ga.addParam("sysparm_change_sys_id", g_form.getUniqueValue());
		ga.addParam("sysparm_model_sys_id", g_form.getValue("chg_model"));
		ga.addParam("sysparm_model_on_form", g_form.hasField("chg_model"));
		ga.addParam("sysparm_change_type", g_form.getValue("type"));
		ga.getXML(updateScratchpad);
		function updateScratchpad(response) {
			var refreshedElements = JSON.parse(answer);
			var model = g_scratchpad.change_model;
			model.refreshModel(refreshedElements);
			model.updateStates(false);
		}
	};
}

 return onLoad_7d234105535712104d8731f0a0490ee6.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
onLoad_7d234105535712104d8731f0a0490ee6();
},'Change Model: Reusables','onLoad_7d234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_bd234105535712104d8731f0a0490ee6'] = 'Change Model: read only state on load';
g_event_handler_ids['onLoad_bd234105535712104d8731f0a0490ee6'] = 'a7cb885c0bb641107b2c8a8db777b264';
var onLoad_bd234105535712104d8731f0a0490ee6 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onLoad_bd234105535712104d8731f0a0490ee6() {
	if (!model)
		return;
	if (g_form.getValue("approval") + "" === "requested" || g_form.getValue("on_hold") + "" === "true")
		g_form.setReadOnly(model.field, true);
	else
		g_form.setReadOnly(model.field, false);
}

 return onLoad_bd234105535712104d8731f0a0490ee6.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
onLoad_bd234105535712104d8731f0a0490ee6();
},'Change Model: read only state on load','onLoad_bd234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_fd234105535712104d8731f0a0490ee6'] = 'Change Model: Show valid states values';
g_event_handler_ids['onLoad_fd234105535712104d8731f0a0490ee6'] = '7ebdc3c15357101034d1ddeeff7b12e3';
var onLoad_fd234105535712104d8731f0a0490ee6 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onLoad_fd234105535712104d8731f0a0490ee6() {
		return;
	var isReadOnly = false;
	var stateControl = g_form.getControl(model.field);
	if (stateControl instanceof HTMLSelectElement) {
		var stateElement = g_form.getElement(model.field);
		isReadOnly = g_form.isReadOnly(stateElement, stateControl);
	} else
isReadOnly = g_form.isReadOnly(model.field);
	if (!isReadOnly)
		g_scratchpad.change_model.updateStates();
}

 return onLoad_fd234105535712104d8731f0a0490ee6.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
onLoad_fd234105535712104d8731f0a0490ee6();
},'Change Model: Show valid states values','onLoad_fd234105535712104d8731f0a0490ee6');

g_event_handlers_onLoad['onLoad_31234105535712104d8731f0a0490ee7'] = 'Set appropriate Change Types';
g_event_handler_ids['onLoad_31234105535712104d8731f0a0490ee7'] = '82afa15e87033200277eff0b84e3ec4d';
function onLoad_31234105535712104d8731f0a0490ee7() {
	if (g_scratchpad.isNew) {
		g_form.removeOption('type','');
	
		if (g_form.getValue('type').toLowerCase()!='standard')
			g_form.removeOption('type','standard');
	}
}

addRenderEventLogged(onLoad_31234105535712104d8731f0a0490ee7, 'onLoad Set appropriate Change Types','onLoad_31234105535712104d8731f0a0490ee7');

g_event_handlers_onLoad['onLoad_71234105535712104d8731f0a0490ee7'] = 'Change Model: Hide field';
g_event_handler_ids['onLoad_71234105535712104d8731f0a0490ee7'] = '47ba1c7953e3101034d1ddeeff7b1252';
var onLoad_71234105535712104d8731f0a0490ee7 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onLoad_71234105535712104d8731f0a0490ee7() {
		return;
	
	g_scratchpad.change_model.hide();
}

 return onLoad_71234105535712104d8731f0a0490ee7.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
onLoad_71234105535712104d8731f0a0490ee7();
},'Change Model: Hide field','onLoad_71234105535712104d8731f0a0490ee7');

g_event_handlers_onLoad['onLoad_b1234105535712104d8731f0a0490ee7'] = 'Show field messages';
g_event_handler_ids['onLoad_b1234105535712104d8731f0a0490ee7'] = '4db9cb50cb300200d71cb9c0c24c9c1c';
function onLoad_b1234105535712104d8731f0a0490ee7() {
	if (g_form.getValue("on_hold") === 'true') {
		g_form.showFieldMsg("state", getMessage("Change is currently on hold"));
		return;
	}
	var stateValue = g_form.getValue("state") + "";
	if (stateValue === "-4" || stateValue === "-3" )
		g_form.showFieldMsg("state", getMessage("Change is waiting for approval"));
}

addRenderEventLogged(onLoad_b1234105535712104d8731f0a0490ee7, 'onLoad Show field messages','onLoad_b1234105535712104d8731f0a0490ee7');

var messages = new GwtMessage();messages.set('Change is currently on hold\r', 'Change is currently on hold');messages.set('Change is waiting for approval');
g_event_handlers_onLoad['onLoad_f1234105535712104d8731f0a0490ee7'] = 'Mark standard change fields readonly';
g_event_handler_ids['onLoad_f1234105535712104d8731f0a0490ee7'] = '540785dc934102009ca87a75e57ffb5f';
function onLoad_f1234105535712104d8731f0a0490ee7() {
	if (g_form.hasField("type") && g_form.getValue("type") !== "standard")
		return;
	if (!g_scratchpad.hasOwnProperty("standardChange") || !g_scratchpad.standardChange.hasOwnProperty("readOnlyFields"))
		return;
	var readOnlyFields = g_scratchpad.standardChange.readOnlyFields;
	if (!Array.isArray(readOnlyFields))
		return;
	readOnlyFields.forEach(function(fieldName) {
		if (g_form.hasField(fieldName))
			g_form.setReadOnly(fieldName, true);
	});
}
function markReadonly(answer){
	if(answer){
		var parsedAttributeNames = answer.split(',');
		for(var i = 0; i < parsedAttributeNames.length; i++){
			if(g_form.hasField(parsedAttributeNames[i]))
				g_form.setReadOnly(parsedAttributeNames[i], true);
		}
	}
}

addRenderEventLogged(onLoad_f1234105535712104d8731f0a0490ee7, 'onLoad Mark standard change fields readonly','onLoad_f1234105535712104d8731f0a0490ee7');

g_event_handlers_onLoad['onLoad_35234105535712104d8731f0a0490ee7'] = 'Change Model: Read only if not initial';
g_event_handler_ids['onLoad_35234105535712104d8731f0a0490ee7'] = '6d94ff455397101034d1ddeeff7b125b';
var onLoad_35234105535712104d8731f0a0490ee7 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onLoad_35234105535712104d8731f0a0490ee7() {
	if (!g_scratchpad.change_model || g_form.isNewRecord())
		return;
	
	g_scratchpad.change_model.readOnlyIfNotInitial();
}

 return onLoad_35234105535712104d8731f0a0490ee7.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
onLoad_35234105535712104d8731f0a0490ee7();
},'Change Model: Read only if not initial','onLoad_35234105535712104d8731f0a0490ee7');

g_event_handlers_onLoad['onLoad_75234105535712104d8731f0a0490ee7'] = 'Change Model: Read only record presets';
g_event_handler_ids['onLoad_75234105535712104d8731f0a0490ee7'] = 'b97cde8f5353101034d1ddeeff7b1231';
var onLoad_75234105535712104d8731f0a0490ee7 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onLoad_75234105535712104d8731f0a0490ee7() {
		return;
	
	g_scratchpad.change_model.setPresetsReadOnly(true);
}

 return onLoad_75234105535712104d8731f0a0490ee7.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
onLoad_75234105535712104d8731f0a0490ee7();
},'Change Model: Read only record presets','onLoad_75234105535712104d8731f0a0490ee7');

addRenderEvent( function() { function onChange_change_request_start_date_0(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue === '')
		return;
	
		g_form.showErrorBox("end_date", errorMsg);
	};
	g_form.hideFieldMsg("end_date", true);
	
	if (validateStartDateBeforeEndDate("start_date", "end_date", showErrorMsg) && (typeof validateMaxDateDuration !== "undefined"))
		validateMaxDateDuration("start_date", "end_date", showErrorMsg);
}

var thisWidget = document.getElementById('change_request.start_date');var thisHandler = new GlideEventHandler('onChange_change_request_start_date_0',onChange_change_request_start_date_0, 'change_request.start_date');g_event_handlers_onChange['onChange_change_request_start_date_0'] = 'Planned Start Date onChange validation';g_event_handler_ids['onChange_change_request_start_date_0'] = '0a6b13db672222004792adab9485ef0e';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_unauthorized_1 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_unauthorized_1(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
	g_form.setMandatory('work_notes', (newValue != 'true'));
   
}

 return onChange_change_request_unauthorized_1.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.unauthorized');var thisHandler = new GlideEventHandler('onChange_change_request_unauthorized_1',onChange_change_request_unauthorized_1, 'change_request.unauthorized');g_event_handlers_onChange['onChange_change_request_unauthorized_1'] = 'Unset Unauthorized requires comment';g_event_handler_ids['onChange_change_request_unauthorized_1'] = '0d599e3a23203300a5eedc1756bf65fa';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_assignment_group_2(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading)
		return;
	if (oldValue != newValue)
		g_scratchpad.formValue = newValue;
	if (newValue === '' || newValue == null || oldValue != newValue || newValue != g_scratchpad.formValue) {
		if(newValue && g_form.getValue("assigned_to")){
			var groupLookupGr = new GlideRecord('sys_user_grmember');
			groupLookupGr.addQuery('group.sys_id', newValue);
			groupLookupGr.addQuery('user', g_form.getValue("assigned_to"));
			groupLookupGr.setLimit(1);
			groupLookupGr.query(groupLookupCallback);
		} else {
			g_form.setValue("assigned_to", "");
		}
	}
}
function groupLookupCallback(groupLookupGr){
	if (!groupLookupGr.hasNext())
		g_form.setValue("assigned_to", "");
}

var thisWidget = document.getElementById('change_request.assignment_group');var thisHandler = new GlideEventHandler('onChange_change_request_assignment_group_2',onChange_change_request_assignment_group_2, 'change_request.assignment_group');g_event_handlers_onChange['onChange_change_request_assignment_group_2'] = 'Empty assigned_to on group change';g_event_handler_ids['onChange_change_request_assignment_group_2'] = '110ff95ec31103001488b731c1d3ae27';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_state_3(control, oldValue, newValue, isLoading, isTemplate) {
	if (oldValue === '-5' ||
		oldValue === '3' ||
		oldValue === '4')
		g_form.setDisplay('on_hold', false);
}

var thisWidget = document.getElementById('change_request.state');var thisHandler = new GlideEventHandler('onChange_change_request_state_3',onChange_change_request_state_3, 'change_request.state');g_event_handlers_onChange['onChange_change_request_state_3'] = 'Hide "On hold" for certain states';g_event_handler_ids['onChange_change_request_state_3'] = '18f82860eb1102002a7a666cd206fe7e';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_state_4 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_state_4(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || !g_form.isLiveUpdating())
		return;
	g_scratchpad.change_model.requestRefreshUpdateModel();
}

 return onChange_change_request_state_4.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.state');var thisHandler = new GlideEventHandler('onChange_change_request_state_4',onChange_change_request_state_4, 'change_request.state');g_event_handlers_onChange['onChange_change_request_state_4'] = 'Change Model: Refresh Model on RW Update';g_event_handler_ids['onChange_change_request_state_4'] = '2bde6b0a5373101034d1ddeeff7b1298';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_end_date_5(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	
	};
	
}

var thisWidget = document.getElementById('change_request.end_date');var thisHandler = new GlideEventHandler('onChange_change_request_end_date_5',onChange_change_request_end_date_5, 'change_request.end_date');g_event_handlers_onChange['onChange_change_request_end_date_5'] = 'Planned End Date onChange validation';g_event_handler_ids['onChange_change_request_end_date_5'] = '307efa93672222004792adab9485ef4f';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_work_end_6(control, oldValue, newValue, isLoading, isTemplate) {
		return;
		g_form.showErrorBox("work_end",errorMsg);
	};
	g_form.hideFieldMsg("work_end", true);
	validateStartDateBeforeEndDate("work_start", "work_end", showErrorMsg);
}

var thisWidget = document.getElementById('change_request.work_end');var thisHandler = new GlideEventHandler('onChange_change_request_work_end_6',onChange_change_request_work_end_6, 'change_request.work_end');g_event_handlers_onChange['onChange_change_request_work_end_6'] = 'Actual End Date onChange validation';g_event_handler_ids['onChange_change_request_work_end_6'] = '30b44867676222004792adab9485ef9b';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_type_7(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	updateStateOptions();
	if (newValue != oldValue){
		$$('button[data-action-name^=state_model]').each(function(e) { e.hide(); });
		g_form.setReadOnly("state", true);
	} else {
		$$('button[data-action-name^=state_model]').each(function(e) { e.show(); });
		g_form.setReadOnly("state", false);
	}
	function updateStateOptions(){		
		var stateModel = g_scratchpad.stateModel;
		if (!stateModel)
			return;
		var typeStateModel = stateModel[g_form.getValue("type")];
		if (!typeStateModel)
			return;
		var currentStateValue = g_form.getValue('state');
		var currentStateName = stateModel.stateNameByValue[currentStateValue];
		if (!currentStateName)
			return;
		var currentStateInModel = typeStateModel[currentStateName];
		if (!currentStateInModel)
			return;
		var nextStates = currentStateInModel.nextState;
		g_form.clearOptions('state');
		g_form.addOption('state', currentStateValue, stateModel.stateLabelByValue[currentStateValue]);
		for (var i = 0; i < nextStates.length; i++)
			addStateOptionByName(nextStates[i], stateModel);
	}
	function addStateOptionByName(stateName, stateModel) {
		if (!stateName || !stateModel)
			return;
		var stateValue = stateModel.stateValueByName[stateName];
		if (!stateValue)
			return;
		var stateDisplayValue = stateModel.stateLabelByValue[stateValue];
		if (!stateDisplayValue)
			return;
		g_form.addOption('state', stateValue, stateDisplayValue);
	}
}

var thisWidget = document.getElementById('change_request.type');var thisHandler = new GlideEventHandler('onChange_change_request_type_7',onChange_change_request_type_7, 'change_request.type');g_event_handlers_onChange['onChange_change_request_type_7'] = 'Set State field and hide UI Actions';g_event_handler_ids['onChange_change_request_type_7'] = '412aa2e787433200277eff0b84e3ecff';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_on_hold_8(control, oldValue, newValue, isLoading, isTemplate) {
	if (newValue === 'true') {
		if (!isLoading)
			g_form.clearValue('on_hold_reason');
		g_form.setDisplay('on_hold_reason', true);
		g_form.setMandatory('on_hold_reason', true);
	} else {
		g_form.setMandatory('on_hold_reason', false);
		g_form.setDisplay('on_hold_reason', false);
	}	
	
	$$('button[data-action-name^=state_model]').each(function(e) {
		if (newValue === 'true')
			e.hide();
		else
			e.show();
	});
}

var thisWidget = document.getElementById('change_request.on_hold');var thisHandler = new GlideEventHandler('onChange_change_request_on_hold_8',onChange_change_request_on_hold_8, 'change_request.on_hold');g_event_handlers_onChange['onChange_change_request_on_hold_8'] = 'Show On hold reason when on hold ticked';g_event_handler_ids['onChange_change_request_on_hold_8'] = '42784272eb0102002a7a666cd206fe05';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_work_start_9(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	
	};
	
}

var thisWidget = document.getElementById('change_request.work_start');var thisHandler = new GlideEventHandler('onChange_change_request_work_start_9',onChange_change_request_work_start_9, 'change_request.work_start');g_event_handlers_onChange['onChange_change_request_work_start_9'] = 'Actual Start date onChange validation';g_event_handler_ids['onChange_change_request_work_start_9'] = '43e2cc27676222004792adab9485efe4';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_business_service_10 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_business_service_10(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	g_form.clearValue("service_offering");
}

 return onChange_change_request_business_service_10.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.business_service');var thisHandler = new GlideEventHandler('onChange_change_request_business_service_10',onChange_change_request_business_service_10, 'change_request.business_service');g_event_handlers_onChange['onChange_change_request_business_service_10'] = 'Empty Service Offering on Service change';g_event_handler_ids['onChange_change_request_business_service_10'] = '9b9e4b7bb7c41010dff9fa13ee11a925';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_chg_model_11 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_chg_model_11(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading && !g_form.isNewRecord())
		return;
	var ga = new GlideAjax('ChangeModelAJAXProcessor');
	ga.addParam("sysparm_name", "getModel");
	ga.addParam("sysparm_table", g_form.getTableName());
	ga.addParam("sysparm_change_sys_id", g_form.getUniqueValue());
	ga.addParam("sysparm_model_sys_id", g_form.getValue("chg_model"));
	ga.addParam("sysparm_model_on_form", g_form.hasField("chg_model"));
	ga.addParam("sysparm_change_type", g_form.getValue("type"));
	ga.getXML(updateScratchpad);
	function updateScratchpad(response) {
		var answer = response.responseXML.documentElement.getAttribute("answer");
		var refreshedElements = JSON.parse(answer);
		
		g_scratchpad.change_model.setPresetsReadOnly(false);
		g_scratchpad.change_model.refreshModel(refreshedElements);
		g_scratchpad.change_model.updateStates(true);
		g_scratchpad.change_model.updatePresets();
		g_scratchpad.change_model.setPresetsReadOnly(true);
	}
}

 return onChange_change_request_chg_model_11.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.chg_model');var thisHandler = new GlideEventHandler('onChange_change_request_chg_model_11',onChange_change_request_chg_model_11, 'change_request.chg_model');g_event_handlers_onChange['onChange_change_request_chg_model_11'] = 'Change Model: Refresh on change';g_event_handler_ids['onChange_change_request_chg_model_11'] = 'a36fbb895397101034d1ddeeff7b1203';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_state_12 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_state_12(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue === '' || g_form.isLiveUpdating())
		return;
	var intOldValue = parseInt(oldValue, 10);
	var intNewValue = parseInt(newValue, 10);
	if (intNewValue !== 4 || (intOldValue === intNewValue && intOldValue === 4))
		return;
	var workNotesComplete = false;
	var dialog = new GlideModal('change_confirm_reason', false, 648, 250);
	dialog.setTitle(new GwtMessage().getMessage('Cancel Change Request'));
	dialog.setPreference('focusTrap', true);
	dialog.setPreference('onPromptComplete', onPromptComplete);
	dialog.setPreference('onPromptCancel', onPromptCancel);
	dialog.on('closeconfirm', onPromptCancel);
	dialog.setPreference('buttonLabelComplete', new GwtMessage().getMessage('OK'));
	dialog.setPreference('buttonLabelCancel', new GwtMessage().getMessage('Cancel'));
	dialog.render();
	function onPromptComplete(notes) {
		workNotesComplete = true;
		g_form.setValue("work_notes", notes);
		gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_canceled");
	}
	function onPromptCancel() {
		if (workNotesComplete)
			return;
		g_form.setValue("state", oldValue);
	}
}

 return onChange_change_request_state_12.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.state');var thisHandler = new GlideEventHandler('onChange_change_request_state_12',onChange_change_request_state_12, 'change_request.state');g_event_handlers_onChange['onChange_change_request_state_12'] = 'Show Cancel Reason modal';g_event_handler_ids['onChange_change_request_state_12'] = 'aa78ab09c313101035ae3f52c1d3ae20';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_conflict_status_13(control, oldValue, newValue, isLoading, isTemplate) {
    function getSchedulingConflictMessage() {
        var startDateReadOnly = g_form.isReadOnly("", g_form.getControl("start_date"));
        var endDateReadOnly = g_form.isReadOnly("", g_form.getControl("end_date"));
        if (startDateReadOnly || endDateReadOnly)
            return new GwtMessage().getMessage("Scheduling conflict detected. Review the Conflicts form section.");
return new GwtMessage().getMessage("Scheduling conflict detected. Use the <a href='javascript:void(0);' onclick='openNextAvailableTime()'>Scheduling Assistant</a> to avoid conflicts.");
    }
    function showConflictNotification() {
		var showConflictMessage = g_scratchpad.show_conflict_message;
        if (showConflictMessage.property === "never") return false;
        if (showConflictMessage.property === "always") return true;
		var showNotification = showConflictMessage.preference;
        return showNotification;
    }
    var gURL = new GlideURL();
    gURL.setFromCurrent();
    var isPrint = !!gURL.getParam("sysparm_media");
    if (!isPrint && newValue === "Conflict" && showConflictNotification()) {
        g_form.addWarningMessage(getSchedulingConflictMessage(), "conflict_warn_status");
        return;
    } else if (isLoading || newValue === '')
        return;
    var chgGlideUI = GlideUI.get();
    var messageKey = "warning_" + getSchedulingConflictMessage();
    if (!chgGlideUI.messages[messageKey])
        return;
    delete chgGlideUI.messages[messageKey];
    var messageCount = Object.keys(chgGlideUI.messages).length;
    if (messageCount === 0)
        chgGlideUI.clearOutputMessages();
    else {
        var msgElement = $("conflict_warn_status");
        if (msgElement)
            msgElement.remove();
    }
}

var thisWidget = document.getElementById('change_request.conflict_status');var thisHandler = new GlideEventHandler('onChange_change_request_conflict_status_13',onChange_change_request_conflict_status_13, 'change_request.conflict_status');g_event_handlers_onChange['onChange_change_request_conflict_status_13'] = 'Conflict change';g_event_handler_ids['onChange_change_request_conflict_status_13'] = 'b04104c673a023008ef62d2b04f6a778';g_event_handlers.push(thisHandler);});
var messages = new GwtMessage();messages.set('Scheduling conflict detected. Use the <a href=\'javascript:void(0);\' onclick=\'openNextAvailableTime()\'>Scheduling Assistant</a> to avoid conflicts.\r', 'Scheduling conflict detected. Use the <a href=\'javascript:void(0);\' onclick=\'openNextAvailableTime()\'>Scheduling Assistant</a> to avoid conflicts.');messages.set('Scheduling conflict detected. Review the Conflicts form section.');addRenderEvent( function() { var onChange_change_request_state_14 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_state_14(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	
	if (g_form.getValue(model.field) + "" !== model.initial_state) {
		g_form.setReadOnly("cmdb_ci", true);
		return;
	}
	
	g_form.setReadOnly("cmdb_ci", false);
}

 return onChange_change_request_state_14.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.state');var thisHandler = new GlideEventHandler('onChange_change_request_state_14',onChange_change_request_state_14, 'change_request.state');g_event_handlers_onChange['onChange_change_request_state_14'] = 'Read only CI';g_event_handler_ids['onChange_change_request_state_14'] = 'ba512e675363101034d1ddeeff7b1281';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { function onChange_change_request_state_15(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue === '' || !g_form.isLiveUpdating())
		return;
	if (g_scratchpad.isUpdatingState)
		return;
	if (newValue != oldValue)
	else
			return;
			return;
			return;
			return;
		g_scratchpad.isUpdatingState = true;
		g_scratchpad.isUpdatingState = false;
	}
			return;
			return;
			return;
	}
}

var thisWidget = document.getElementById('change_request.state');var thisHandler = new GlideEventHandler('onChange_change_request_state_15',onChange_change_request_state_15, 'change_request.state');g_event_handlers_onChange['onChange_change_request_state_15'] = 'Set State field and hide UI Actions';g_event_handler_ids['onChange_change_request_state_15'] = 'e26b9ab6c31003001488b731c1d3aec4';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_chg_model_16 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_chg_model_16(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	if (oldValue === 'aedc6a625323101034d1ddeeff7b1296') 
		g_form.setMandatory('work_notes', true);
}

 return onChange_change_request_chg_model_16.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.chg_model');var thisHandler = new GlideEventHandler('onChange_change_request_chg_model_16',onChange_change_request_chg_model_16, 'change_request.chg_model');g_event_handlers_onChange['onChange_change_request_chg_model_16'] = 'Change Unauth model requires comment';g_event_handler_ids['onChange_change_request_chg_model_16'] = 'ef7cce2057041110403e8f90ac94f94f';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_approval_17 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_approval_17(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue === "" || !model)
		return;
	if (newValue === "requested")
	else if (g_form.getValue("on_hold") + "" !== "true") {
		model.requestRefreshUpdateModel();
	}
}

 return onChange_change_request_approval_17.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.approval');var thisHandler = new GlideEventHandler('onChange_change_request_approval_17',onChange_change_request_approval_17, 'change_request.approval');g_event_handlers_onChange['onChange_change_request_approval_17'] = 'Change Model: read only state Approval';g_event_handler_ids['onChange_change_request_approval_17'] = '03b91c580bf641107b2c8a8db777b25a';g_event_handlers.push(thisHandler);});
addRenderEvent( function() { var onChange_change_request_on_hold_18 = (function(GlideAjax,g_form,GlideDialogWindow,GlideRecord,window,document,$,jQuery,$$,$j,$F,gel,undefined){
function onChange_change_request_on_hold_18(control, oldValue, newValue, isLoading, isTemplate) {
		return;
	if (newValue === "true")
	else if (g_form.getValue("approval") + "" !== "requested") {
	}
}

 return onChange_change_request_on_hold_18.bind(null)})(GlideAjax,ScopedGFormGenerator("global"),ScopedGlideDialogWindowGenerator("global"),GlideRecord,null,null,null,null,null,null,null,null);
var thisWidget = document.getElementById('change_request.on_hold');var thisHandler = new GlideEventHandler('onChange_change_request_on_hold_18',onChange_change_request_on_hold_18, 'change_request.on_hold');g_event_handlers_onChange['onChange_change_request_on_hold_18'] = 'Change Model: read only state On hold';g_event_handler_ids['onChange_change_request_on_hold_18'] = '09ebd4980bf641107b2c8a8db777b24a';g_event_handlers.push(thisHandler);});

var gcm = new GwtContextMenu('context_1', true);
			var gcmSection = gcm;
			gcm.clear();
			gcm.setTableName('change_request');

gcm.addHref("Save", "gsftSubmit(gel('sysverb_update_and_stay'))", null, "Save record and remain here", null, "");

gcm.addHref("Create Outage", "gsftSubmit(gel('create_outage_record'))", null, "Create an outage record to track the duration of down time or degradation of service", null, "");

gcm.addHref("Refresh Impacted Services", "gsftSubmit(gel('refresh_impacted_services'))", null, "Refresh list of Business Services impacted by the associated CI", null, "");

gcm.addHref("Edit Risk Conditions", "gsftSubmit(gel('bp_edit_risk_conditions'))", null, "Go to list of Risk Conditions", null, "");

var mModify = new GwtContextMenu('context_modifysubdfac7d63cb900200d71cb9c0c24c9c43');
        mModify.setTableName('change_request');
        mModify.clear();

            gcm.addLine();
            
                    mModify.addFunc("Form Builder", function() {
                        var url = new GlideURL('now/build/form/main/params/table/change_request/view/Default view/page/views/context/platform');
                        g_navigation.open(url.getURL(), 'edit_form_builder');
                    });
                
                    mModify.addFunc("Form Design", function() {
                        var url = new GlideURL('$ng_fd.do');
                        url.addParam('sysparm_attributes', 'startTable:"change_request",startView:"Default view"');
						g_navigation.open(url.getURL(), 'edit_form_design');
                    });
                
                mModify.addFunc("Form Layout", function() { personalizer('auto', 'section'); });
            
                mModify.addFunc("Related Lists", function() { personalizer('change_request', 'related_list'); });
              
            mModify.addLine();
            
                mModify.addURL("All", "personalize_all.do?sysparm_rules_table=change_request&sysparm_rules_label=Change Requests");
            
                mModify.addURL("Table", "sys_db_object.do?sys_id=change_request&sysparm_refkey=name");
            
				mModify.addFunc("Security Rules", function() { listSecurity('table', 'change_request'); });
			
                mModify.addFunc("Business Rules", function() { listCollection('sys_script', 'collection', 'change_request', ''); });
            
                mModify.addFunc("Client Scripts", function() { listCollection('sys_script_client', 'table', 'change_request', ''); });
            
				mModify.addFunc("UI Policies", function() { listCollection('sys_ui_policy', 'table', 'change_request', ''); });
            
				mModify.addFunc("Data Policies", function() { listCollection('sys_data_policy2', 'model_table', 'change_request', ''); });
            
				mModify.addFunc("UI Actions", function() { listCollection('sys_ui_action', 'table', 'change_request', ''); });
            
				mModify.addFunc("Notifications", function() { listCollection('sysevent_email_action', 'collection', 'change_request', ''); });
            
                mModify.addFunc("Dictionary", function() { personalizeFields('change_request', 'sys_dictionary_list.do'); });
            
            gcm.addMenu("Configure", mModify, "context_configuremenu");
        
var mExport = new GwtContextMenu('context_pdfsubdfac7d63cb900200d71cb9c0c24c9c43');
        mExport.setTableName('change_request');
        mExport.clear();mExport.addFunc("PDF (Portrait)", function() { exportToPDF('change_request','f028ee81539f12104d8731f0a0490ef1',false,'', ''); });
			mExport.addFunc("PDF (Landscape)", function() { exportToPDF('change_request','f028ee81539f12104d8731f0a0490ef1',true,'', ''); });mExport.addURL("XML (This Record)", "change_request.do?UNL&sysparm_query=sys_id=f028ee81539f12104d8731f0a0490ef1");gcm.addMenu("Export", mExport, "context_exportmenu");gcm.addLine();

gcm.addFunc("Create Favorite", function() {
				if (typeof MagellanCreateFavorites !== 'undefined' && MagellanCreateFavorites.addFavorite) {
					MagellanCreateFavorites.addFavorite({
						title : 'Create new Change Request',
						icon : 'form'
					});
				}
			}, "context_createfavorite");

				gcm.addHref("Copy URL", "copyToClipboard('https://dev224577.service-now.com/nav_to.do?uri=change_request.do?sys_id=f028ee81539f12104d8731f0a0490ef1');");
			
		gcm.addHref("Copy sys_id", "copyToClipboard('f028ee81539f12104d8731f0a0490ef1');");

btn btn-destructive-subdued personalize_form_preference_reset pull-right

<li class="row" role="presentation" tabindex="-1"><span class="input-group-checkbox"><input class="checkbox" type="checkbox" id="#{name}" name="#{name}" value="selected" tabindex="-1" data-now-ux-metrics-event="Personalize Form Field" role="menuitemcheckbox" aria-label="#{HTML:label}" aria-checked="false"></input><label for="#{name}" class="checkbox-label pull-left">#{HTML:label}</label></span></li>

messages.set('All Templates');
messages.set('Edit Template');
messages.set('Create New Template');
messages.set('Templates');
messages.set('No templates are available');
messages.set('Create a new one?');
messages.set('Save');
messages.set('Edit');
messages.set('#{HTML:name} Template not Applied');
messages.set('#{name} Template not Applied: All fields Read Only');
messages.set('#{name} Template Applied');
messages.set('#{HTML:name} Template Applied with #{errorCount} #{errorText}');
messages.set('See Details');
messages.set('Set <b>#{HTML:name}</b> to <b>#{HTML:value}</b>');
messages.set('Undo Changes');
messages.set('Unable to update field');
messages.set('#{item} not present on this form');
messages.set('Close');
messages.set('Help');
messages.set('Templates let you update several fields on a form with a single click');
messages.set('Clear');
messages.set('Cancel');
messages.set('Added Template bar landmark to bottom of form.');
messages.set('Removed Template bar landmark from bottom of form.');
})()

navbar navbar-default navbar-fixed-bottom template-overflow loaded

window.g_form_dirty_support = true;
			
			window.g_form_dirty_message = 'Changes have been made, continuing will discard the changes';
			$j(window).bind('beforeunload', onWindowClose);

			window.g_form_dirty_autosave = false

messages.set('Save Changes','Save changes');
})()

<div role="alertdialog" aria-labelledby="dirty_form_modal_confirmation_description" aria-describedby="dirty_form_modal_confirmation_description"><p id="dirty_form_modal_confirmation_description">Do you want to save changes to #{HTML:displayValue} before leaving this page?</p><div class="modal-footer flex"><button class="btn btn-destructive-subdued" role="button" data-action="discard" type="button">Discard</button><button class="btn btn-primary" role="button" data-action="save" type="button">Save</button></div></div>

			function onCondition_e84d25c9cba02200dff9b9c0c24c9c88_true() {
	// in Service Portal the "isFieldVisible" function is named "isVisible" 

	// if both fields are not visible on the form then no action is needed
		return;

	// if the new "cab_date_time" field has a value or if the original "cab_date" field is empty then we can show the new field

}
window.onCondition_e84d25c9cba02200dff9b9c0c24c9c88_true = onCondition_e84d25c9cba02200dff9b9c0c24c9c88_true
		});ui_policy_add([{"actions":[{"cleared":"false","disabled":"true","mandatory":"ignore","name":"type","visible":"ignore"}],"condition_fields":["state","chg_model"],"conditions":[{"field":"state","newquery":false,"oper":"!=","or":false,"term":"state!=-5","type":"integer","value":"-5"},{"field":"chg_model","newquery":false,"oper":"ISEMPTY","or":false,"term":"chg_modelISEMPTY","type":"reference","value":""}],"debug":false,"list_actions":[],"onload":false,"reverse":true,"script_false":"","script_true":"","short_description":"Make Type as read-only when state is not New","source_table":"sys_ui_policy","sys_id":"16e82ea787433200277eff0b84e3ecb7","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"ignore","mandatory":"ignore","name":"approval","visible":"false"}],"condition_fields":[],"conditions":[],"debug":false,"list_actions":[],"onload":true,"reverse":false,"script_false":"","script_true":"","short_description":"Hide fields - Approval","source_table":"sys_ui_policy","sys_id":"554ada10cb300200d71cb9c0c24c9cc6","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"ignore","mandatory":"ignore","name":"unauthorized","visible":"true"}],"condition_fields":["type","chg_model"],"conditions":[{"field":"type","newquery":false,"oper":"=","or":false,"term":"type=emergency","type":"string","value":"emergency"},{"field":"chg_model","newquery":false,"oper":"ISEMPTY","or":false,"term":"chg_modelISEMPTY","type":"reference","value":""},{"field":"chg_model","newquery":true,"oper":"=","or":false,"term":"chg_model=aedc6a625323101034d1ddeeff7b1296","type":"reference","value":"aedc6a625323101034d1ddeeff7b1296"}],"debug":false,"list_actions":[],"onload":true,"reverse":true,"script_false":"","script_true":"","short_description":"Unauthorized change only available for non-Model Emergency changes or Unauthorized Change Model","source_table":"sys_ui_policy","sys_id":"687ad9b2230833001488dc1756bf659a","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"ignore","mandatory":"true","name":"assignment_group","visible":"ignore"}],"condition_fields":["state"],"conditions":[{"field":"state","newquery":false,"oper":"IN","or":false,"term":"stateIN-4,-3,-2,-1,0,3","type":"integer","value":"-4,-3,-2,-1,0,3"}],"debug":false,"list_actions":[],"onload":true,"reverse":true,"script_false":"","script_true":"","short_description":"Mandatory - Assignment Group","source_table":"sys_ui_policy","sys_id":"bad87d63cb900200d71cb9c0c24c9c3d","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"ignore","mandatory":"true","name":"end_date","visible":"ignore"},{"cleared":"false","disabled":"ignore","mandatory":"true","name":"cmdb_ci","visible":"ignore"},{"cleared":"false","disabled":"ignore","mandatory":"true","name":"short_description","visible":"ignore"},{"cleared":"false","disabled":"ignore","mandatory":"true","name":"start_date","visible":"ignore"}],"condition_fields":["chg_model"],"conditions":[{"field":"chg_model","newquery":false,"oper":"=","or":false,"term":"chg_model=88b7fa2a5323101034d1ddeeff7b12a5","type":"reference","value":"88b7fa2a5323101034d1ddeeff7b12a5"}],"debug":false,"list_actions":[],"onload":true,"reverse":false,"script_false":"","script_true":"","short_description":"Change Model: Cloud Infrastructure mandatory fields","source_table":"sys_ui_policy","sys_id":"d17b6a7a5310201034d1ddeeff7b1279","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"ignore","mandatory":"true","name":"close_code","visible":"ignore"},{"cleared":"false","disabled":"ignore","mandatory":"true","name":"close_notes","visible":"ignore"}],"condition_fields":["state"],"conditions":[{"field":"state","newquery":false,"oper":"=","or":false,"term":"state=3","type":"integer","value":"3"}],"debug":false,"list_actions":[],"onload":true,"reverse":true,"script_false":"","script_true":"","short_description":"Mandatory - Close notes and code when in Closed state","source_table":"sys_ui_policy","sys_id":"e7dc75a3cb900200d71cb9c0c24c9ca3","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"ignore","mandatory":"ignore","name":"cab_required","visible":"true"},{"cleared":"false","disabled":"ignore","mandatory":"ignore","name":"cab_date_time","visible":"true"},{"cleared":"false","disabled":"ignore","mandatory":"ignore","name":"cab_delegate","visible":"true"},{"cleared":"false","disabled":"ignore","mandatory":"ignore","name":"cab_recommendation","visible":"true"}],"condition_fields":["type"],"conditions":[{"field":"type","newquery":false,"oper":"IN","or":false,"term":"typeINnormal,emergency","type":"string","value":"normal,emergency"}],"debug":false,"list_actions":[],"onload":true,"reverse":true,"script_false":"","script_true":"onCondition_e84d25c9cba02200dff9b9c0c24c9c88_true","short_description":"Show - CAB fields for Normal/Emergency changes","source_table":"sys_ui_policy","sys_id":"e84d25c9cba02200dff9b9c0c24c9c88","table":"sys_ui_policy"},{"actions":[{"cleared":"false","disabled":"false","mandatory":"ignore","name":"cab_date_time","visible":"ignore"},{"cleared":"false","disabled":"false","mandatory":"ignore","name":"cab_recommendation","visible":"ignore"}],"condition_fields":["state"],"conditions":[{"field":"state","newquery":false,"oper":"=","or":false,"term":"state=-5","type":"integer","value":"-5"},{"field":"state","newquery":false,"oper":"=","or":true,"term":"state=-4","type":"integer","value":"-4"},{"field":"state","newquery":false,"oper":"=","or":true,"term":"state=-3","type":"integer","value":"-3"}],"debug":false,"list_actions":[],"onload":true,"reverse":true,"script_false":"","script_true":"","short_description":"Read-only CAB Date and CAB recommendation when in Scheduled state","source_table":"sys_ui_policy","sys_id":"bf1c5ef0d7103200f2d224837e610320","table":"sys_ui_policy"}]);
	        addRenderEvent(ui_policy_onLoad);
			jslog("added render event for ui_policy_onLoad");

/*! RESOURCE: /scripts/DataLookup.jsx */
(function (w) {
	w.DataLookup = {
		fields: {},
		addDataLookupDefinition: function(field, id) {
			if (!window.DataLookup.fields[field])
				window.DataLookup.fields[field] = [id];
			else
				window.DataLookup.fields[field].push(id);
		},
		bindEventHandlers: function() {
			for (var field in window.DataLookup.fields) {
				window.g_event_handlers.push({
					fieldName: field,
					handler: function (control, oldValue, newValue, isLoading) {
						window.setTimeout(function(){
							window.DataLookup.process(control, oldValue, newValue, isLoading);
						});
					}
				});
			}
		},
		process: function(control, oldValue, newValue, isLoading) {
			if (isLoading || !g_form)
				return;
			var serializedForm = g_form.serialize();
			if (!serializedForm || (
				w.DataLookup.lastLookup === serializedForm && w.DataLookup.lastLookupField === control.name))
				return;
			if (w.g_skip_dataLookup)
				return;
			for (var i = 0; i < this.fields[control.name].length; i++) {
				w.DataLookup.lastLookupField = control.name;
				w.DataLookup.lastLookup = serializedForm;
				this.processAjaxRequest(this.fields[control.name][i], control);
			}
		},
		processAjaxRequest: function(lookupId, control) {
			var ajax = new GlideAjax('AJAXDataLookup');
			ajax.addParam('sysparm_silent_request', 'true');
			ajax.addParam('sys_lookup_id', lookupId);
			ajax.addParam('sys_target', g_form.getTableName());
			ajax.addParam('sys_uniqueValue', g_form.getUniqueValue());
			ajax.addEncodedString(w.DataLookup.lastLookup);
			ajax.getXML(function(response) {
				CustomEvent.fire('glide_optics_inspect_put_context', 'data_lookup', 'onchange of ' + control.name);
				$A(response.responseXML.getElementsByTagName('item')).each(function(item) {
					var name = item.getAttribute('name');
					var val = item.getAttribute('value');
					var label = item.getAttribute('label');
					w.g_skip_datalookup = true;
					if (val != null && label != null)
						g_form.setValue(name, val, label);
					else
						g_form.setValue(name, val);
					w.g_skip_datalookup = false;
				});
				CustomEvent.fire('glide_optics_inspect_pop_context');
			})
		}
	};
})(window);
;

		// if DataLookup.js didn't load, don't throw errors
		if (!window.DataLookup)
			return;window.DataLookup.bindEventHandlers();
      });

			"use strict";
			gFormSW.jslog("form rendered");
			addTopRenderEvent(tabs2Init);SN.formAnnotations.preference = true;
			SN.formAnnotations.infoPreference = true;

			addRenderEvent(function() {
				SN.formAnnotations.init();
				var g_section_contents = null;
				CustomEvent.fire("form.loaded");
			});addLateLoadEvent(function() {
					CustomEvent.fire('frame.resized');
					CustomEvent.fire('refresh.event');
				});})();// Focus to the first writable element on the form
				//
				// (jayb) Do this as inline script instead of an onload event so that it
				// runs at form render time, not after other onload events that can delay
				// the focus setting and cause it to occur after the user has clicked on
				// a field.
				//
				// If the user has pressed the mouse button, then don't focus since we will
				// be stealing the focus from the use at that point.
					if (!g_formDirtyFocus) {
						var f = document.forms['change_request.do'];
						if (!f) return;
						if (top.NOW.magellan && top.NOW.magellan.setNavigatingState)
							top.NOW.magellan.setNavigatingState(true);
						if (top.NOW.magellan && top.NOW.magellan.invokeWhenShouldFocus){
							top.NOW.magellan.invokeWhenShouldFocus(window, function() {
								focusFirstElement(f);
							});
						}
					}
				});createRowSysId();
		function createRowSysId() {
		var x = gel('sys_uniqueValue');
		if (x)
			rowSysId = x.value;
		}

		// PRB668587 - Fixes Windows 7 IE11 touch scroll issue
		(function() {
			if ((!isMSIE11) || ("ontouchstart" in document.documentElement) || ("ongesturestart" in document.documentElement) || typeof $j === 'undefined')
				return;
			$j('body').removeClass('touch_scroll');
		})();

		var x = NOW.xperf;
		x.formEnd = NOW.xperf.now();
		$j(function() {
			var x = NOW.xperf;
			var ms = Math.round(x.formEnd - x.formBegin);
			CustomEvent.fire('page_timing', { name: 'SECT', ms: ms, win: window });
		})

try {
				NOW.recordMembers = JSON.parse("{\"5e1826c1539f12104d8731f0a0490e94\":{\"name\":\"Samuel Johnson\",\"initials\":\"SJ\",\"last_name\":\"Johnson\",\"sys_id\":\"5e1826c1539f12104d8731f0a0490e94\",\"record_is_visible\":true}}");
			} catch(e) {
				jslog("Error parsing record members: " + e);
			}

function initAngularForm() {
			var baseModules = [];baseModules = baseModules.concat(['sn.common.video', 'sn.common.stream', 'heisenberg', 'sn.form_presence']);return window.ANGULAR_BOOTSTRAPPER.bootstrap(baseModules);}

						window.MagellanCreateFavorites = {
							navColors : ["purple","blue","cyan","aquamarine","green","yellow","orange","burnt-orange","red","pink","fuschia","white"],
							navIcons : ["article-document","user","user-group","lightbulb","home","mobile","comment","mail","locked","database","book","drawer","folder","catalog","tab","cards","tree-right","tree","book-open","paperclip","edit","trash","image","search","power","cog","star","star-empty","new-ticket","dashboard","cart-full","view","label","filter","calendar","script","add","delete","help","check-circle","alert","sort-ascending","console","list","form","livefeed","key","hr"],
							paramBlackList : ["sysparm_no_stack","sysparm_userpref_module","sysparm_record_target","sysparm_record_row","sysparm_record_rows","sysparm_record_list"]
						};
					
window.NOW.UXMetrics = window.NOW.UXMetrics || {};
			window.NOW.UXMetrics.viewInfo = {
				'viewId': 'Default view',
				'viewName': 'Default view'
			}

import("/uxasset/externals/@devsnc/library-intent-channel/index.jsdbx")
						.then(function (libraryIntentChannel) {
							var registerTranslator = libraryIntentChannel.registerTranslator;
							var setActiveTranslator = libraryIntentChannel.setActiveTranslator;
							var updateContext = libraryIntentChannel.updateContext;

							try {
								var sysId = 'f028ee81539f12104d8731f0a0490ef1';
								var table = 'change_request';

								var translatorKey = "form/" + table + "/" + sysId;

								var context = {
									table,
									sysId,
									experienceName: 'Core UI'
								};

								registerTranslator(translatorKey, function () {}, context);
								setActiveTranslator(translatorKey);

								updateContext(translatorKey, context);

							} catch(e) {
								jslog("Error in registering Now Assist context: " + e);
							}
					
						}).catch(function (e) {
							jslog("Error in registering Now Assist context: " + e);
						});

if ('') 
			GlideTransactionScope.setTransactionScope('');
		if ('') 
			GlideTransactionScope.setRecordScope('');
		if ('') 
			GlideTransactionScope.setTransactionUpdateSet('');
		if (typeof g_form != 'undefined')
			$(g_form.getFormElement()).fire('glidescope:initialized', {gts : GlideTransactionScope});

/*! RESOURCE: /scripts/elements/element_attributes.jsx */
addAfterPageLoadedEvent(function () {
document.body.on('click', 'a[data-type="spell_check"]', function(evt, element) {
	spellCheck(element.getAttribute('data-ref'));
});
document.body.on('click', 'a[data-type="mode_toggler"]', function(evt, element) {
	toggleMode(element.getAttribute('data-ref')); 
});
document.body.on('click', 'a[data-type="debug_toggler"]', function(evt, element) {
	toggleDebug(element.getAttribute('data-ref')); 
});
document.body.on('click', 'a[data-type="html_view"]', function(evt, element) {
	htmlView(element.getAttribute('data-ref'), element.getAttribute('data-sys_id')); 
});
function toggleMode(id) {
	var widget = $("ni_mode_" + id);
	if (!widget)
		return;
	var currentMode = widget.value;
	if (currentMode == 'freeform')
		currentMode = 'select';
	else
		currentMode = 'freeform';
	widget.value = currentMode;
	setMyVisibility(id);
	setPreference('mode_' + id, currentMode);
}
});
;

/*! RESOURCE: /scripts/elements/element_pick_list.jsx */
document.on('keyup', 'input[data-type="pick_list"]', function (evt, element) {
	var ref = element.getAttribute('data-ref');
	var d = element.getAttribute('data-dependent');
	acKeyUp(evt, ref, 'PickList', d);
});
document.on('keydown', 'input[data-type="pick_list"]', function (evt, element) {
	acKeyDown(evt, ref, 'PickList', d);
});
document.on('keypress', 'input[data-type="pick_list"]', function (evt, element) {
	checkEnter(evt, ref);
});
document.on('click', 'a[data-type="pick_list"]', function (evt, element) {
	mousePositionSave(evt);
	openPickList(element);
});
document.on('keydown', 'a[data-type="pick_list"]', function (evt, element) {
	if (evt.keyCode === 32) {
		evt.preventDefault();
		openPickList(element);
	}
});
function openPickList(element) {
	var url = "pick_list.do";
	url += "?sysparm_name=" + element.getAttribute("data-table");
	url += "&sysparm_target=" + element.getAttribute("data-ref");
	url += "&sysparm_element=" + element.getAttribute("data-element");
	url += "&sysparm_view=sys_pick_list";
	picklistOpen(url, 530, 0, 0, element.getAttribute("data-ref"), element.getAttribute("data-dependent"));
}
document.on('click', 'a[data-type="response_pick_list"]', function (evt, element) {
	var url = "response_list.do";
	url += "&sysparm_sys_id=" + element.getAttribute("data-sys_id");
	picklistOpen(url, 530, 0, 0, element.getAttribute("data-ref"));
});
})();
;

/*! RESOURCE: /scripts/elements/element_attribute_knowledge.jsx */
	document.on('click', 'a[data-type="attribute_knowledge"]', function(evt, element) {
	var kb_url_prefix = (document.getElementById("kb_url_prefix") ? document.getElementById("kb_url_prefix").value : 'kb');
    mousePositionSave(evt);
    var customPopup = element.getAttribute('data-custom');
    var table = element.getAttribute('data-table');
    var operator = element.getAttribute('data-op');
    g_kb_search_result_order = element.getAttribute('data-order');
    var usev2search = element.getAttribute('data-legacy-renderer');
    var ref = element.getAttribute('data-for');
	var isSocialQAPluginEnabled = element.getAttribute('data-sqa-installed');
    element = $(ref);
    if (!element)
        return;
    
    window.fillField = ref;
    var searchText = element.value;
    if (customPopup)
        window[customPopup](searchText, element);
    else {
    	var url;
    	if(usev2search == 'true'){
	        url = 'kb_find.do?sysparm_search=' + encodeURIComponent(searchText);
	        url += "&sysparm_nameofstack=kbpop";
	        url += "&sysparm_kb_search_table=" + table;
	        url += "&sysparm_operator=" + operator;
	        url += "&sysparm_order=" + g_kb_search_result_order;
	        popupOpenStandard(url, "kb2task");
    	}else{
	        url = kb_url_prefix+'?id=kb_search&spa=1&query='+ encodeURIComponent(searchText);
	        url += '&sysparm_kb_search_table=' + table;
			if(isSocialQAPluginEnabled == 'true')
			{
				url+='&resources=Knowledge';
			}
	        var width = 1000;
	        var height = 480;
	        var features = "width="+ width +",height="+ height +",toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollbars=1";
	        popupOpen(url, "kb2task", width, height, features, true );
		}
    }
});
})();
function setKbSortOrder(value) {
	var fieldName = window.fillField;
	var e = document.getElementById(fieldName);
	e = e.parentNode.parentNode;
	e = $(e);
	var f = e.getElementsBySelector('a[data-for=' + fieldName + ']');
	if (f.length > 0) {
		var g = f[0];
		g.setAttribute('data-order', value);
	}
}
;

/*! RESOURCE: /scripts/doctype/element_choice.jsx */
var KEYCODES = [32, 38, 40];
CachedEvent.after('glideform.initialized', function(e) {
	var formElement = e.getFormElement && e.getFormElement();
	$j('select', formElement).on('mousedown keydown', function (ev) {
		if (ev.target && ev.target.getAttribute('readonly')) {
			if (ev.type === 'keydown' && KEYCODES.indexOf(ev.keyCode) < 0) {
				return;
			}
			ev.target.focus && ev.target.focus();
			return ev.preventDefault();
		}
	});
});
;

/*! RESOURCE: /scripts/elements/element_boolean.jsx */
addLateLoadEvent(function () {
	document.body.on('click', 'input[data-type="boolean"]', function(evt, element) {
		if (element.hasClassName('disabled'))
			return;
		setCheckBox(element);
		var ref = element.getAttribute('data-ref');
		onChange(ref);
		telemetryForRecordUpdateElement(ref);
	});
});
;

/*! RESOURCE: /scripts/elements/textarea_sizer.jsx */
function textareaSizer_initialize(id, collapsed, rows) {
	var e = gel(id);
	if (e) {
	    if (collapsed) {
		   e.is_collapsed = true;
		   e.expand_to_rows = rows;
           Event.observe(e, "change", textareaSizer_Expand, false);
		   Event.observe(e, "focus", textareaSizer_Expand, false);
		}
		textareaSizer_Related(e);
	}		
}
function textareaSizer_Resize(id, change) {
    if (e) {
       e.is_collapsed = false;
	   textareaResizer(id, change);
	   textareaSizer_Related(e);
       CustomEvent.fire('textarea.resize', id, change);
    }
}
		    
function textareaSizer_Expand(ev) {
    var e = Event.element(ev);
    if (e) {
       if (e.is_collapsed) {
           e.is_collapsed = false;
           textareaSizer(e.id, e.expand_to_rows);
	   	   textareaSizer_Related(e);
       }
    }
 }
 function textareaSizer_Related(e) {
	setTimeout("textareaSizer_Related0('" + e.id + "')", 0);
}
function textareaSizer_Related0(id) {
    var taElement = gel(id);
    if (taElement) {
        var relatedBuddy = taElement.getAttribute("relatedBuddy");
        if (relatedBuddy) {
            var h = getHeight(taElement);
            var div = gel(relatedBuddy);
        	div.style.height = h;
        }
    }
}
;

/*! RESOURCE: /scripts/elements/textarea_autosizer.jsx */
var textareaResize = (function($) {
	var defaults = {
			className: 'autosizejs',
			id: 'autosizejs',
			append: '\n',
			callback: false,
			resizeDelay: 10,
			placeholder: true
		},
copy = '<textarea tabindex="-1" aria-label="{{textarea}}" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',
		typographyStyles = [
			'fontFamily',
			'fontSize',
			'fontWeight',
			'fontStyle',
			'letterSpacing',
			'textTransform',
			'wordSpacing',
			'textIndent',
			'lineHeight'
		],
		mirrored,
		mirror = $(copy).data('autosize', true)[0];
	return function(id, options) {
		if (!id)
			return;
		var ta = document.getElementById(id);
		if (!ta)
			return;
		var $ta = $(ta);
		if ($ta.data('autosize'))
			return;
		if (!options)
			options = {};
		if (!mirror.parentNode || mirror.parentNode !== document.body)
			$(document.body).append(mirror);
		var maxHeight,
			minHeight,
			boxOffset = 0,
			codeMirrorBoxOffset = 0,
			callback = $.isFunction(options.callback),
			originalStyles = {
				height: ta.style.height,
				overflow: ta.style.overflow,
				overflowY: ta.style.overflowY,
				wordWrap: ta.style.wordWrap,
				resize: ta.style.resize
			},
			timeout,
			width = $ta.width(),
			codeMirror = ($(ta.nextSibling).hasClass('CodeMirror')) ? ta.nextSibling : undefined;
		var codeMirrorContent = codeMirror ? codeMirror.lastChild.firstChild : undefined;
		$ta.data('autosize', true);
		if ($ta.css('box-sizing') === 'border-box' || $ta.css('-moz-box-sizing') === 'border-box' || $ta.css('-webkit-box-sizing') === 'border-box')
			boxOffset = $ta.outerHeight() - $ta.height();
		if(codeMirror) {
			if ($(codeMirror).css('box-sizing') === 'border-box' || $(codeMirror).css('-moz-box-sizing') === 'border-box' || $(codeMirror).css('-webkit-box-sizing') === 'border-box')
				codeMirrorBoxOffset = $(codeMirror).outerHeight() - $(codeMirror).height();
			if (codeMirror.CodeMirror && codeMirror.CodeMirror.options.mode === "javascript")
				codeMirrorBoxOffset += 25;
		}
		minHeight = Math.max(parseInt($ta.css('minHeight'), 10) - boxOffset || 0, $ta.height());
		if (ta.tagName && ta.tagName.toLowerCase() === 'span') {
			$ta.css({
				overflow: $ta[0].style.overflow || 'hidden',
				overflowY: $ta[0].style.overflowY || 'hidden',
				wordWrap: 'break-word',
				resize: $ta[0].style.resize || 'none'
			});
		} else {
			$ta.css({
				overflow: 'hidden',
				overflowY: 'hidden',
				wordWrap:'break-word',
				resize: 'none'
			});
		}
		var style, bordersAndPadding;
		function setWidth() {
			style = style || window.getComputedStyle(ta, null) || ta.style;
			var width = ta.getBoundingClientRect().width;
			if (width === 0 || typeof width !== 'number')
				width = parseInt(style.width, 10);
			if (!bordersAndPadding) {
				bordersAndPadding = ['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'].reduce(function(acc, val) {
					return acc + parseInt(style[val], 10);
				}, 0);
			}
			mirror.style.width = (width - bordersAndPadding) + 'px';
		}
		function initMirror() {
			mirrored = ta;
			mirror.className = options.className;
			mirror.id = options.id;
			maxHeight = parseInt($ta.css('maxHeight'), 10);
			var styles = typographyStyles.reduce(function(acc, val) {
				acc[val] = codeMirror ? $(codeMirror).css(val) : $ta.css(val);
				return acc;
			}, {});
			$(mirror).css(styles).attr('wrap', $ta.attr('wrap'));
			setWidth();
		}
		function adjust(e) {
			var height, original, codeMirrorHeight, doc, docValue;
			if (ta.tagName && ta.tagName.toLowerCase() === 'span') {
				return;
			}
			if (mirrored !== ta)
				initMirror();
			else
				setWidth();
			if (!ta.value && options.placeholder) {
				mirror.value = ($ta.attr("placeholder") || '') + options.append;
			} else {
				doc = codeMirror && codeMirror.codeMirror && codeMirror.CodeMirror.getDoc();
				docValue = doc && doc.getValue();
				mirror.value = (docValue ? docValue : ta.value) + options.append;
			}
			mirror.style.overflowY = ta.style.overflowY;
			original = parseInt(ta.style.height,10);
			height = mirror.scrollHeight;
			if (maxHeight && height > maxHeight) {
				ta.style.overflowY = 'scroll';
				height = maxHeight;
				if (codeMirror)
					codeMirror.lastChild.style.overflowY = 'scroll';
			} else {
				ta.style.overflowY = 'hidden';
				if (height < minHeight)
					height = minHeight;
					codeMirror.lastChild.style.overflowY = 'hidden';
			}
			if (codeMirror) {
				codeMirrorHeight = height + codeMirrorBoxOffset;
				if (parseInt(codeMirrorContent.style.height, 10))
					codeMirrorHeight = Math.max(parseInt(codeMirrorContent.style.height, 10), codeMirrorHeight);
				if (maxHeight)
					codeMirrorHeight = Math.min(maxHeight, codeMirrorHeight);
			}
			height += boxOffset;
			if (original !== height) {
				ta.style.height = height + 'px';
				if (codeMirror && codeMirror.CodeMirror)
					if (codeMirror.CodeMirror.setHeight)
						codeMirror.CodeMirror.setHeight(codeMirrorHeight + 'px');
					else if (codeMirror.CodeMirror.setSize)
						codeMirror.CodeMirror.setSize(null, codeMirrorHeight + 'px');
				if (callback)
					options.callback.call(ta,ta);
			}
			if ($ta.closest('.tabs2_section').hasClass('tab_section') && !$ta.closest('.tabs2_section').is(':visible')){
				CustomEvent.observe("tab.activated", function(tab){
					if ($ta.closest('.tabs2_section').hasClass(tab))
						adjust();
				});
				return false;
			}
			if (window._frameChanged)
				_frameChanged();
		}
		function resize () {
			clearTimeout(timeout);
			timeout = setTimeout(function(){
				var newWidth = $ta.width();
				if (newWidth !== width && $ta.val() !== '') {
					width = newWidth;
					adjust();
				}
			}, parseInt(options.resizeDelay, 10));
		}
		$ta.on('input.autosize change.autosize', adjust);
		if(codeMirror)
			$(codeMirror).on('paste.autosize keydown.autosize', adjust);
		if (options.resizeDelay !== false)
			$(window).on('resize.autosize', resize);
		$ta.on('autosize.resize', adjust);
		$ta.on('autosize.resizeIncludeStyle', function() {
			mirrored = null;
			adjust();
		});
		$ta.on('autosize.destroy', function(){
			$(window).off('resize', resize);
			$ta
				.off('autosize')
				.off('.autosize')
				.css(originalStyles)
				.removeData('autosize');
			if(codeMirror)
				$(codeMirror).off('.autosize');
		});
		if (ta.value)
			adjust();
	}
})(window.jQuery);
;

/*! RESOURCE: /scripts/classes/GlideTemplateBar.jsx */
var GlideTemplateBar = Class.create({
	initialize : function(table) {
		var self = this;
		setTimeout(function () {
			self.init.apply(self, [table]);
		}, 200);
	},
	
	init: function(table) {
		this.$toggleButton 	= $j('button[data-type="template-list-overflow-button"]');
		this.table = table;
		this.ref = this.$toggleButton.data('ref');
		if (this.$toggleButton.length < 1) 
			return;
		this.$ellipsisButton = $j('button[data-type="template-list-overflow-button"]');
		this.$container = $j(this.$toggleButton.data('target'));
		this.$templateListContainer = $j('#templates-list-container');
		this.$templateList = this.$templateListContainer.find('a:not([data-type="create-new-template"])');
		this.$templateOverflowContainer = $j('.template_overflow_items');
		this.$clearSearchFilterInput = $j('span[data-type="clearTemplateFilter"]');
		this.popoverTabbablesSelector = '#templateOverflowContainer :tabbable, #no_search_results';
		this.isOpen = false;
		this.isLoaded = false;
		this.isUpdating = false;
		this.popupInitialized = false;
		this.templateName = null;
		this.originalQuery = [];
		this.returnedTemplateList = [];
		this.templateArray = [];
		this.lastTemplateElm = null;
		this.bindResize();
		this.update();
		this.loaded();		
	},
	
	update: function(){
		this.updateTemplateListContainer();
		this.hideTemplates();
		this.updateTemplateList();
		this.toggleEllipsis();
	},
	loaded: function(){
		this.isLoaded = true;
		$j('[data-type="template_footer"]').addClass('loaded');
	},
	handleClickEvent: function(){
		if (this.isOpen){
			this.hideEllipsisPopover();
		} else {
			if (!this.popupInitialized) {
				this.initializeEllipsisPopover();
			} else {
				this.showEllipsisPopover();
			}
		}
	},
	handleHtmlClick: function(e){
		if ( this.isOpen && !this.$toggleButton.is(e.target) && this.$container.parents('.popover').has($j(e.target)).length == 0 ) {
		}
	},
	bindResize:function(){
		$j(window).on('resize', function(e) {
			if (this.isOpen){
				this.hideEllipsisPopover();
			}
			this.update();
		}.bind(this));
	},
	initializeEllipsisPopover: function(){
		this.$toggleButton.popover({
			html: true,
			trigger: 'manual',
			title: getMessage('All Templates'),
			content: function(){
				self.$container.show();
				return self.$container;
			},
			viewport: { selector: 'body', padding: 35 }
		});
		this.$toggleButton.data('bs.popover').options.placement = 'top';
		this.popupInitialized = true;
		
		var popover = $j('#templateOverflowContainer').parent().parent();
		popover.attr('role', 'dialog');
		popover.attr('aria-label', getMessage('All Templates'));
		$j('#no_search_results').attr('tabindex','0');
		this.showEllipsisPopover();
	},
	showEllipsisPopover: function(){
		this.$toggleButton.popover('show');
		$j('#overflowTemplateSearch').focus();
		this.isOpen = true;
		this.$ellipsisButton.attr('aria-expanded', 'true');
		this.closePopoverOnBlur();
	},
	closePopoverOnBlur: function(){
		var gtb = this;
		var popoverContainer = $j('#templateOverflowContainer').parent().parent();
		popoverContainer.css({'outline':'none'});
		popoverContainer.attr('tabindex', '-1');
		var tabbables = $j(this.popoverTabbablesSelector);
		tabbables.bind('blur', function (blurEvent) {
			setTimeout(function () {
				var isOut = true;
				var target = blurEvent.relatedTarget || document.activeElement;
				if (target === popoverContainer[0] || popoverContainer.has(target).length)
					isOut = false;
				if (isOut)
		    			gtb.hideEllipsisPopover(true);
	    		}, 10);
		});
	},
	hideEllipsisPopover: function(dontAutoFocus){
		this.resetFiltering();
		this.$toggleButton.popover('hide');
		if (this.isOpen && !dontAutoFocus) {
			this.$ellipsisButton.focus();
		}
		this.$ellipsisButton.attr('aria-expanded', 'false');
		$j(this.popoverTabbablesSelector).unbind("blur");
	},
	openEditTemplateRecordModal: function(sysId){
		var ctm = new GlideModalForm(getMessage('Edit Template'), 'sys_template');
		self.modal = ctm;
		ctm.setPreference('sys_table', self.table);
		ctm.setPreference('sysparm_view', 'template_modal');
		ctm.setSysID(sysId);
		ctm.setPreference('sysparm_form_only', 'true');
		ctm.setPreference('focusTrap', true);
		ctm.setOnloadCallback(self.onModalLoadCallback.bind(self));
		ctm.on('closeconfirm', self.onCompletionCallback.bind(self));
		ctm.render();
	},
	openTemplateRecordModal: function(){
		var fields = g_form.getEditableFields();
		var query = 'table=' + this.table;
		var templateQuery = this.getTemplateData();
templateQuery = templateQuery.replace(/\$/g, "$/");
		var ctm = new GlideModalForm(getMessage('Create New Template'), 'sys_template');
		ctm.setSysID(-1);
		ctm.setPreference('sysparm_query', query);
		ctm.setPreference('sysparm_orig_query', this.originalQuery);
		ctm.setPreference('sysparm_template_query', templateQuery);
		ctm.setPreference('sysparm_template_editable', fields.join());
	},
	onCompletionCallback: function(){
		this.getTemplatesList();
		this.modal = null;
	},
	getTemplatesList: function(){
		this.isUpdating = true;
		var ga = new GlideAjax('GetTemplatesList');
		ga.addParam('sysparm_table_name', this.table);
		ga.addParam('sysparm_template_bar_only', 'true');
		ga.addParam('sysparm_name', 'returnList');
		ga.getXML(parseUpdateList.bind(this));
		function parseUpdateList(response) {
			var xml = response.responseXML;
			this.returnedTemplateList = [];
			var templates = xml.getElementsByTagName('template');
			for (var i = 0; i< templates.length; i++){
				var item = templates[i];
				var show = item.getAttribute('show_on_template_bar');
				if (show == true || show === ""){
					this.returnedTemplateList.push({
						label : item.getAttribute('name'),
						value : item.getAttribute('sys_id'),
						application: item.getAttribute("application")
					});
				}
			}
			this.updateTemplatePopover();
		}
	},
	updateTemplateListContainer: function(){
		if (!this.isUpdating){
			return;
		}
		if (this.returnedTemplateList.length > 0){
			this._renderTemplateList();
		} else {
			this._renderEmptyList();
		}
	},
	_renderTemplateList: function(){
var html = ['<b>' + getMessage('Templates') + ':&nbsp;</b>'];
		var i = 0;
		var templateListLength = this.returnedTemplateList.length;
		html.push('<ul id="templates-list-items">');
		
		while (templateListLength > i){
			html.push(this.TEMPLATE_ITEM_TEMPLATE.evaluate(this.returnedTemplateList[i]));
			i++;
		}
		
html.push('</ul>');
		this.$templateListContainer.html(html.join(''));
	},
	_renderEmptyList: function(){
		var html = [getMessage("No templates are available"),
		'<ul id="templates-list-items">',
		'<li class="templates-list-item">',
		'<a data-type="create-new-template" href="javascript:void(0);" role="button" ',
		'data-ref="' + this.ref + '"',
'title="' + getMessage("Create New Template") + '">' + getMessage("Create a new one?") + '</a>',
'</li>',
'</ul>']
		this.$templateListContainer.html(html.join(' '));
	},
	onModalLoadCallback: function(){
		this.iframeForm = this.getIframeForm();
		$j(this.iframeForm).parents('html').removeClass('templates');
	},
	getTemplateData: function(){
		var formElems = g_form.getEditableFields();
		var query = formElems.filter(function(elem){
			var value = g_form.getValue(elem);
			return !!(value !== '' && value !== null);
		});
		for(var i=0 ; i < query.length; i++ ) {
			var originalVal = g_form.getValue('sys_original.' + this.table + '.' + query[i]);
			if (originalVal == g_form.getValue(query[i])){
				this.originalQuery.push(query[i] + '=' + g_form.getValue(query[i]));
			}
		}
		query = query.map(function(elem){
			var elementValue = g_form.getValue(elem);
elementValue = elementValue.replace(/\^/g, '^^');
			return elem + '=' + elementValue + '^';
		});
		query = query.sort().join('');
		return query.substring(0, query.length - 1);
	},
	applyTemplate: function(val, name){
		g_form.removeAllDecorations();
		this.templateName = name;
		var ga = new GlideAjax('AjaxClientHelper');
		ga.addParam('sysparm_name','getValues');
		ga.addParam('sysparm_sys_id', val);
		ga.addParam('sysparm_current_table_name', g_form.getTableName());
		ga.getXML(this._applyTemplateResponse.bind(this));
	},
	_applyTemplateResponse: function(response){
		if (!response || !response.responseXML)
			return;
		this.templateResponse = response.responseXML;
		this.applyRecord();
	},
	applyRecord: function() {
		this.templateModifiedFields = {};
		this.alert_html = [];
		this.templateErrors = 0;
		this.omittedFormElements = [];
		this.allErrors = false;
		this.pluralizedErrorMessage = ' conflicts';
		this._getTemplateResponseItems();
		this.generateAlerts();
		this.showAlert();
		this.focusAlert();
		this.setModifiedFields();
	},
	_getTemplateResponseItems: function() {
		var items = this.templateResponse.getElementsByTagName('item');
		var reduceItems = Array.prototype.reduce.bind(items);
		var itemLibrary = reduceItems(function(library, item) {
			item.getAttribute('dependent') ? library[1].push(item) : library[0].push(item);
			return library;
		}, [[], []]);
		this.templateResponseItems = itemLibrary[0].concat(itemLibrary[1]);
		this.templateDependentReponseItems = itemLibrary[1];
	},
	generateAlerts: function() {
		for (var i = 0; i < this.templateDependentReponseItems.length; i++) {
			var item = this.templateDependentReponseItems[i];
			var name = item.getAttribute('name');
			g_form.setTemplateValue(name, "");
		}
		for (var i = 0; i < this.templateResponseItems.length; i++) {
			var item = this.templateResponseItems[i];
			var displayValue = null;
			if (!this._checkIfReadOnly(name)) {
				var status = this.applyItem(name, item.getAttribute('value'), item.getAttribute('rawDisplayVal'));
				if (status && status.success === false)
					this.errorAlert(item);
				else {
					this.pushToModifiedFieldsObject(name);
					displayValue = this.getDisplayValue(name, item);
					this.standardAlert(displayValue, item);
				}
			} else
				this.errorAlert(item);
		}
		if (this.templateErrors == i)
			this.allErrors = true;
		if (this.templateErrors == 1)
			this.pluralizedErrorMessage = ' conflict';
 		if (this.omittedFormElements.length > 0)
			this._addOmittedFormElementsToAlert();
	},
	_checkIfReadOnly: function(name){
		var control = g_form.getControl(name);
		var ed = g_form.getGlideUIElement(name);
		var labelControl = g_form.getControl(name + '_label');
		if (g_form.isReadOnly('', control))
			return true;
		if (labelControl && ed.type === "reference" && g_form.isReadOnly('', labelControl))
		if (gel('sys_readonly.' + this.table + '.' + name) )
		return false;
	},
	standardAlert: function(displayValue, item) {
		if (displayValue)
displayValue = displayValue.replace(/<(?:.|\n)*?>/gm, '');
		if (displayValue && displayValue.length > 254) {
			displayValue = displayValue.substr(0, 254) + '...';
		}
		var name = item.getAttribute('name');
		var label =  g_form.getLabel(name);
		this.alert_html.push(this.ALERT_ITEM_TEMPLATE.evaluate({
			name: $j(label).text(),
			value: displayValue
		}));
	},
	errorAlert: function(item) {
		var error;
		var label = item.getAttribute('label');
		if (g_form.getElement(name)){
			error = g_form.getLabel(item.getAttribute('name')).innerText;
			this.alert_html.unshift(this.ERROR_ITEM_TEMPLATE.evaluate({
				error: error
			}));
		} else {
			this.omittedFormElements.push(label);
		}
		this.templateErrors++;
	},
	applyItem: function(element, value, rawDisplayValue) {
		if (value == null || value == 'null'){
			return;
		}
		var ed = g_form.getGlideUIElement(element);
		if (ed && ed.type == 'glide_encrypted') {
			return g_form.setTemplateValue(element, value, value);
		} else if (ed && ed.type == 'currency')
			return g_form.setTemplateValue(element, value, rawDisplayValue);
		else
			return g_form.setTemplateValue(element, value);
	},
	pushToModifiedFieldsObject: function(element){
		var fieldName = this.table + '.' + element;
		this.templateModifiedFields[fieldName] = true;
	},
	setModifiedFields: function(){
		if(this.templateModifiedFields){
			$j.extend(g_form.modifiedFields, this.templateModifiedFields);
			g_form.modified = true;
			var uniqueValue = g_form.getUniqueValue();
			CustomEvent.fireAll('form.isModified', {uniqueValue: uniqueValue, isModified: g_form.modified, iframeElId: window.frameElement ? window.frameElement.id : null});
		}
	},
	cleanModifiedFields: function(){
		var fields = Object.keys(this.templateModifiedFields);
		for (var i=0; i < fields.length; i++) {
			if (g_form.modifiedFields[fields[i]])
				delete g_form.modifiedFields[fields[i]];
			if (Object.keys(g_form.modifiedFields).length == 0){
				g_form.modified = false;
			}
		}
	},
	toggleEllipsis: function(){
		if ( this.templateArray.length > 0 ) {
			this.$ellipsisButton.removeClass('invisible');
		} else {
			this.$ellipsisButton.addClass('invisible');
		}
	},
	showAlert:function(){
		this.alert_html = this.alert_html.join('');
		var templateValues = {
			name: this.templateName,
			alerts : this.alert_html,
			errorCount: this.templateErrors,
			errorText: this.pluralizedErrorMessage
		};
		var gui = new GlideUI();
		if(this.templateErrors > 0) {
			if (this.allErrors){
				gui.addOutputMessage({
					'msg': this.ERROR_TEMPLATE.evaluate(templateValues),
					'type': 'error'
				});
			} else {
					'msg': this.WARN_TEMPLATE.evaluate(templateValues),
					'type': 'warning'
				});
			}
		} else {
			gui.addOutputMessage({
				'msg': this.ALERT_TEMPLATE.evaluate(templateValues)
			});
		}
	},
	focusAlert: function() {
		$j('a[data-type="template_alert_toggle"]:last').focus();
		$j('#close-messages-btn:not(.template-bound)').addClass('template-bound').on('click', this.focusLastTemplateClicked.bind(this));
	},
	focusLastTemplateClicked: function() {
		if (this.lastTemplateElm) {
			this.lastTemplateElm.focus();
			this.lastTemplateElm = null;
		}
		$j('#close-messages-btn.template-bound').removeClass('template-bound').off('click');
	},
	setLastTemplateSelected: function(elm) {
		this.lastTemplateElm = this.isOpen ? this.$toggleButton : $j(elm);
	},
	getDisplayValue: function(name, item){
		var optionControl = g_form.getOptionControl(name);
		if (optionControl) {
			return optionControl.options[optionControl.selectedIndex].text;
		}
		if ( item.getAttribute('value') === '' ) {
			return 'None';
		}
		for (var i=0; i<this.templateResponseItems.length; i++){
			if (this.templateResponseItems[i].getAttribute("name") == name && this.templateResponseItems[i].getAttribute("displayVal") != "undefined")
				return this.templateResponseItems[i].getAttribute("displayVal");
		}
		return item.getAttribute('value');
	},
	getIframeForm:function(){
		var iframe =  $('dialog_frame');
		if (!iframe){
			return;
		}
		var iframeDocument = iframe.contentDocument ? iframe.contentDocument : iframe.contentWindow.document;
		this.iframeWindow = iframe.contentWindow;
		return iframeDocument.getElementById('sys_template.do');
	},
	updateTemplateList: function(){
		this.templateArray = this._createTemplateArray();
	},
	hideTemplates: function(){
		var parentElem = $j('#templates-list-container');
		var listItems = parentElem.find('.templates-list-item');
		var parentElemWidth = parentElem.innerWidth();
var totalWidth = parentElem.children('b').width();
		var extraPadding = 20;
		if(NOW.isUsingPolaris) {
			extraPadding = 0;
		}
		for (var i = 0; i < listItems.length; i++){
			var elem = $j(listItems[i]);
			totalWidth += elem.outerWidth() + extraPadding;
			if (totalWidth > parentElemWidth){
				elem
					.removeClass('visible')
					.nextAll()
					.removeClass('visible');
				break;
			}
			$j(elem).addClass('visible');
		}
	},
	updateTemplatePopover: function(){
		var html = [];
		var overFlowTemplate;
		var canWriteAccess = (this.$container[0].getAttribute("canWrite") == "true");
		var currentScope = getPreference("apps.current_app") || "global";
		for (var i = 0; i < this.templateArray.length; i++){
			if (canWriteAccess && this.templateArray[i].application == currentScope)
				overFlowTemplate = this.OVERFLOW_TEMPLATE_TEMPLATE;
			else
				overFlowTemplate = this.OVERFLOW_TEMPLATE_TEMPLATE_READ_ONLY;
			html.push(overFlowTemplate.evaluate(this.templateArray[i]));
		}
		this.$templateOverflowContainer.html(html.join(''));
	},
	toggleAlerts: function(detailLink){
		var templateAlertDetails = $j(detailLink).siblings('ul.template_details');
		templateAlertDetails.toggleClass('visible');
		var $showLink = $j('#see_detail_link');
		var $hideLink = $j('#hide_detail_link');
		if ((templateAlertDetails[0].className).indexOf("visible") > -1){
			detailLink.setAttribute("aria-expanded", "true");
			$showLink.addClass('hidden');
			$hideLink.removeClass('hidden');
			templateAlertDetails.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
				if ((templateAlertDetails[0].className).indexOf('visible') > -1)
					templateAlertDetails[0].setAttribute('style', 'max-height:' + templateAlertDetails.height() + 'px')
			});
		} else{
			detailLink.setAttribute("aria-expanded", "false");
			$hideLink.addClass('hidden');
			$showLink.removeClass('hidden');
			templateAlertDetails[0].removeAttribute('style');
		}
	},
	undoTemplate: function(){
		for (var i=0; i<fields.length; i++) {
			var modifiedField = fields[i];
			var originalField = 'sys_original.' + fields[i];
			var displayField = 'sys_display.original.' + fields[i];
			if (g_form.getValue(originalField) != g_form.getValue(modifiedField)) {
				g_form.setValue(modifiedField, g_form.getValue(originalField), g_form.getValue(displayField));
			}
		}
		this.cleanModifiedFields();
		GlideUI.get().clearOutputMessages();
		this.focusLastTemplateClicked();
	},
	_addOmittedFormElementsToAlert: function(){
		var elements = [];
		for(var i = 0; i < this.omittedFormElements.length; i++){
			if (this.omittedFormElements[i] !== null)
elements.push("<li><b>" + this.omittedFormElements[i] + "</b></li>");
		}
		this.alert_html.unshift(this.OMITTED_FORM_ELEMENT_ALERT.evaluate({
			count: this.omittedFormElements.length,
			elements: elements.join(''),
			item: (this.omittedFormElements.length > 1) ? 'items are' : 'item is'
		}));
	},
	_createTemplateArray: function(){
		return $j.map(this.$templateList, function(i){
			return {
				'name': $j(i).text(),
				'value': $j(i).attr('data-ref'),
				'application': $j(i).attr('data-application')
			};
		});
	},
	filterOverflowTemplates: function(searchTerm){
		if (!searchTerm){
			this._removeFilteringClasses();
		} else {
			this.$templateOverflowContainer
				.addClass('filtered')
				.siblings('.input-group-transparent').addClass('filtered');
			this.$clearSearchFilterInput.attr('tabindex', '0');
			this._matchElements(searchTerm);
		}
	},
	_matchElements:function(searchTerm){
		var parentElem = this.$templateOverflowContainer;
		var listItems = parentElem.find('a:not(.template-edit)');
		var noMatch = true;
		var textOfItem;
		listItems.each(function(index, item){
			textOfItem = $j(item).text();
			if (textOfItem && textOfItem.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1){
				noMatch = false;
				$j(item).parent().addClass('match');
			} else {
				$j(item).parent().removeClass('match');
			}
		});
		$j('#no_search_results').toggle(noMatch);
	},
	resetFiltering: function(){
		this._clearFilterInput();
		this._removeFilteringClasses();
		$j('#no_search_results').hide();
	},
	_removeFilteringClasses: function(){
		$j(this.$overflowTemplates).each(function(i, elem){
			$j(elem).parent().removeClass('match');
		});
		this.$templateOverflowContainer
			.removeClass('filtered')
			.siblings('.input-group-transparent').removeClass('filtered');
		this.$clearSearchFilterInput.attr('tabindex', '-1');
	},
	_clearFilterInput: function(){
		$j('#overflowTemplateSearch').val('');
	},
	type: 'GlideTemplateBar',
	z: null
});
GlideTemplateBar.prototype.ALERT_TEMPLATE = new Template(
getMessage('#{HTML:name} Template Applied') + '<br /><br />' +
'<a href="#" role="button" aria-controls="alert_template_details" aria-expanded="false" data-type="template_alert_toggle">' + getMessage('See Details') + '</a>' +
	'<ul id="alert_template_details" class="template_details">' +
	'#{alerts}' +
'<li class="row"><a href="#" role="button" data-type="template_undo_button">' + getMessage('Undo Changes') + '</a></li></ul>'
);
GlideTemplateBar.prototype.WARN_TEMPLATE = new Template(
getMessage('#{HTML:name} Template Applied with #{errorCount} #{errorText}') + '<br /><br />' +
'<a href="#" role="button" aria-controls="warn_template_details" aria-expanded="false" data-type="template_alert_toggle">' + getMessage('See Details') + '</a>' +
	'<ul id="warn_template_details" class="template_details">' +
		'#{alerts}' +
);
GlideTemplateBar.prototype.ERROR_TEMPLATE = new Template(
getMessage('#{HTML:name} Template not Applied') + ' <br /><br />' +
'<a href="#" role="button" aria-controls="error_template_details" aria-expanded="false" data-type="template_alert_toggle">' + getMessage('See Details') + '</a>' +
'<ul id="error_template_details" class="template_details">#{alerts}</ul>'
);
GlideTemplateBar.prototype.TEMPLATE_ITEM_TEMPLATE = new Template(
	'<li class="templates-list-item">' + 
'<a href="#" role="button" class="template-item" data-type="apply-template" data-ref="#{HTML:value}" data-application="#{application}">#{HTML:label}</a>' +
'</li>'
);
GlideTemplateBar.prototype.OVERFLOW_TEMPLATE_TEMPLATE = new Template(
	'<li class="row">' +
'<a href="#" role="button" data-type="apply-template" data-ref="#{HTML:value}">#{HTML:name}</a>' +
'<a class="template-edit" href="#" role="button" data-type="edit-template" data-ref="#{HTML:value}">' + getMessage("Edit") + '</a>' +
'</li>'
);
GlideTemplateBar.prototype.OVERFLOW_TEMPLATE_TEMPLATE_READ_ONLY = new Template(
'</li>'
);
GlideTemplateBar.prototype.ALERT_ITEM_TEMPLATE = new Template(
getMessage('Set <b>#{HTML:name}</b> to <b>#{HTML:value}</b>') +
'</li>'
);
GlideTemplateBar.prototype.ERROR_ITEM_TEMPLATE = new Template(
'<div class="icon-alert" /> ' +
getMessage('Unable to update field') + '"<b>#{HTML:error}</b>"' +
'</li>'
);
GlideTemplateBar.prototype.OMITTED_FORM_ELEMENT_ALERT = new Template(
'<b>#{count}</b>' + getMessage('#{item} not present on this form') +
		'<ol>' +
			'#{elements}' +
'</ol>' +
'</li>'
);
	addLateLoadEvent(function () {
		var elem = $j('[data-type="template_footer"]');
		var table = elem.data('ref');
		var gtb = new GlideTemplateBar(table);
		function createNewTemplate(evt) {
			evt.preventDefault();
			gtb.hideEllipsisPopover();
			gtb.openTemplateRecordModal();
		}
		function prepareTemplate(evt, elem) {
			var val = elem.getAttribute('data-ref');
			var name = $j(elem).text();
			gtb.setLastTemplateSelected(elem);
			gtb.applyTemplate(val, name);
		}
		document.body.on('click', 'a[data-type="apply-template"]', function(evt, elem){
			prepareTemplate(evt, elem);
		});
		document.body.on('keydown', 'a[data-type="apply-template"]', function(evt, elem){
			if (evt.keyCode === 32) {
				prepareTemplate(evt, elem);
			}
		});
		document.body.on('click', 'a[data-type="edit-template"]', function(evt, elem){
			gtb.openEditTemplateRecordModal(val);
		});
		document.body.on('click', 'button[data-type="template-list-overflow-button"]', function(evt){
			gtb.handleClickEvent();
		});
		document.body.on('click', '[data-type="create-new-template"]', function (evt) {
			createNewTemplate(evt);
		});
		document.body.on('keydown', '[data-type="create-new-template"]', function (evt) {
			if (evt.keyCode == 32) {
				createNewTemplate(evt);
			}
		});
		document.body.on('click', 'button[data-type="disable-template-bar"]', function(evt){
			CustomEvent.fire('templateToggle', false);
		});
		document.body.on('click', 'a[data-type="template_alert_toggle"]', function(evt, elem){
			gtb.toggleAlerts(elem);
		});
		document.body.on('keydown', 'a[data-type="template_alert_toggle"]', function(evt, elem){
				evt.preventDefault();
				gtb.toggleAlerts(elem);
			}
		});
		document.body.on('click', 'a[data-type="template_undo_button"]', function(evt){
			gtb.undoTemplate();
		});
		document.body.on('keydown', 'a[data-type="template_undo_button"]', function(evt, elem){
				gtb.undoTemplate();
			}
		});
		document.body.on('click', 'button[data-type="clear-template-modal"]', function(evt, elem){
			if (!gtb.iframeWindow){
				return;
			}
			gtb.iframeWindow.g_form.setValue('template', '');
		});
		document.body.on('click', 'button[data-type="save-template-modal"]', function(evt, elem){
			if (!gtb.iframeForm){
				return;
			}
			gsftSubmit(elem, gtb.iframeForm);
		});
		document.body.on('click', 'span[data-type="clearTemplateFilter"]', function(evt){
			gtb.resetFiltering();
			$j('#overflowTemplateSearch').focus();
		});
		$j('[data-type="template_footer"]').on({
			'keyup': function(){
				var val = $j('#overflowTemplateSearch').val();
				gtb.filterOverflowTemplates(val);
			}
		}, '#overflowTemplateSearch');
		$j('html').on('click', function(e){
			gtb.handleHtmlClick(e);
		});
		
		CustomEvent.on('closeTemplateModal', function(){
			var gtm = new GlideModal().get('sys_template');
			if (gtm)
				gtm.destroy();
		});
	});
})();
;

/*! RESOURCE: /scripts/elements/doctype/element_date_time.jsx */
document.body.on('click', 'button[data-type=\'date_time\']', function(evt, element) {
	var format = element.getAttribute('data-date_time_format');
ScriptLoader.getScripts('scripts/classes/GwtDateTimePicker.js', function() {
		try {
			new GwtDateTimePicker(ref, format, true);
		} catch (e) {
			console.error(e);
		}
	});
	evt.preventDefault();
});
var GlideElementDateTime = Class.create({
	initialize: function(name) {
		this.name = name;
	},
	setValue: function(value, displayValue) {
			value = displayValue;
    	var date_element = gel(this.name);
		date_element.value = value;
		onChange(this.name);
	  	CustomEvent.fire('date_field_changed', {id: this.name, dateString: value});
	}
});
(function(){
	CachedEvent.after('glideform.initialized', function() {
		var elems = $$('input[data-type=\'glide_element_date_time\']');
		elems.each(function(elem, index) {
			var ref = elem.getAttribute('data-ref');
			if (ref) {
				var gdtHandler = new GlideElementDateTime(ref);
				g_form.registerHandler(ref, gdtHandler);
			}
			elem.observe('change', function(evt){
				onChange(ref);
				CustomEvent.fire('date_field_changed', {id: ref, dateString: elem.value});
			});
		})
	});
})();
;

GlideMenu.addScripts({"onScripts":{"216ac28a0a0a0bb200af43eb879c30ae":" \n","41a60a53471331004695d7527c9a7164":" \n","5402b80e9fa322005cf3ffa4677fcf10":" \n","5d93ba0047331100ba13a5554ee490c6":"setTaskable();\ndisableInVtbListView();\nfunction setTaskable() {\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n   if (!hdrCell)\n      return;\n\t\n   if (hdrCell.getAttribute('glide_type') === 'related_tags')\n      g_menu.setDisabled(g_item);\n   else\n\t  g_menu.setEnabled(g_item);\n}\nfunction disableInVtbListView() {\n\tvar containerFrame = g_list.getContainerFrame();\n\tif (containerFrame && containerFrame.getAttribute('id') === 'vtb_list_view')\n\t\tg_menu.setDisabled(g_item);\n}\n","731a31e7bf460100e628555b3f073957":" \n","ab7f76d70ad33702005f177f6d3a7145":"setSortable();\nfunction setSortable() {\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n   if (!hdrCell)\n      return;\n   var sortable = (getAttributeValue(hdrCell, 'sortable') == \"true\" && getAttributeValue(hdrCell, 'sort_dir') != \"ASC\");\n   if (sortable)\n      g_menu.setEnabled(g_item);\n   else\n      g_menu.setDisabled(g_item);\n}\n","ab8369ac0ad337020058ada2a743863a":"setSortable();\nfunction setSortable() {\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n   if (!hdrCell)\n      return;\n   var sortable = (getAttributeValue(hdrCell, 'sortable') == \"true\" && getAttributeValue(hdrCell, 'sort_dir') != \"DESC\");\n   if (sortable)\n      g_menu.setEnabled(g_item);\n   else\n      g_menu.setDisabled(g_item);\n}\n","b0b807c087702100deddb882a2e3ece0":" \n","b17a69630a0a0bbb00f2601a9fa1e2da":"setFilter();\r\n\r\nfunction setFilter() {\r\n   var menu = g_item.subMenu;\r\n   var query = g_list.getQuery({groupby: true});\r\n   if (query.endsWith('^'))\r\n      query = query.substring(0, query.length - 1);\r\n\r\n   menu.clearSelected();\r\n   if (query.startsWith('^'))\r\n      query = query.substring(1);\r\n\r\n   var item = menu.getItem(query);\r\n   if (item)\r\nmenu.setImage(item, \"images/checked.pngx\");\n}\n","c8c2eae10a0004e30084537138ba00ed":"setWorkflowExpandable();\r\n\r\nfunction setWorkflowExpandable() {\r\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\r\n   if (!hdrCell)\r\n      return;\r\n\r\n   var workflow = (getAttributeValue(hdrCell, 'glide_type') == \"workflow\");\r\n   if (workflow)\r\n      g_menu.setVisible(g_item);\r\n   else\r\n      g_menu.setHidden(g_item);\r\n}\r\n","e1990773c0a80a6d0f81499a5c80c069":"setDateColumn();\nfunction setDateColumn() {\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n   if (!hdrCell)\n      return;\n   var type = getAttributeValue(hdrCell, 'glide_type');\n   var sortable = (getAttributeValue(hdrCell, 'sortable') == \"true\");\n   var isDateTime = (type == \"glide_date_time\" || type == \"glide_date\");\n   if (isDateTime) {\n\t   if(sortable)\n\t\t  g_menu.setVisible(g_item);\n\t   else\n\t\t  g_menu.setDisabled(g_item);\n   } else\n\t   g_menu.setHidden(g_item);\n}\n","e1d5cb8ec0a80a6d006da0404916035e":"setDateColumn();\nfunction setDateColumn() {\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n   if (!hdrCell)\n      return;\n   var type = getAttributeValue(hdrCell, 'glide_type');\n   var sortable = (getAttributeValue(hdrCell, 'sortable') == \"true\");\n   var isDateTime = (type == \"glide_date_time\" || type == \"glide_date\");\n   if (isDateTime) {\n\t   if(sortable)\n\t\t  g_menu.setVisible(g_item);\n\t   else\n\t\t  g_menu.setDisabled(g_item);\n   } else\n\t   g_menu.setHidden(g_item);\n}\n","ed38768dc0a80066001cd51eca319cc9":"setMatchable();\nfunction setMatchable() {\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n   if (!hdrCell)\n      return;\n   var filterable = (getAttributeValue(hdrCell, 'filterable') == \"true\");\n   var columnOK = (hdrCell.getAttribute('glide_type') != 'related_tags');\n\t\n   if (filterable && columnOK)\n      g_menu.setEnabled(g_item);\n   else\n      g_menu.setDisabled(g_item);\n}\n","ee21f9a7c0a8006600a47b4baccf6a83":"setFilterable();\nfunction setFilterable() {\n\t\n   var hdrCell = g_list.getHeaderCell(g_fieldName);\n\t\n   if (!hdrCell)\n      return;\n   var filterable = (getAttributeValue(hdrCell, 'filterable') == \"true\") && !(hdrCell.getAttribute('glide_type') == 'related_tags');\n\t   \n   if (filterable)\n      g_menu.setEnabled(g_item);\n   else\n      g_menu.setDisabled(g_item);\n}\n"},"scripts":{"1895ef3407201000e8735720e1021eda":"function showDataPolicies(query) {\n   var url = new GlideURL('sys_data_policy2_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n   \n   window.location = url.getURL();\n}\n","216ac28a0a0a0bb200af43eb879c30ae":"g_list.refreshWithOrderBy(1);\n","330107128f01200072a89cfde0f923c4":"function showUIActions(query) {\n   var url = new GlideURL('sysevent_email_action_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n   \n   window.location = url.getURL();\n}\n","3f629b670a0a0bd501d3310795df264a":"function personalizeAll(table, label) {\n   var url = new GlideURL('personalize_all.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_rules_table', table);\n   url.addParam('sysparm_rules_label', label);\n   window.location = url.getURL();\n}\n","41a60a53471331004695d7527c9a7164":"runContextAction();\nfunction runContextAction() {\n\tvar tableName = g_list.getTableName();\n\tvar fields = g_list.fields;\n\tvar query = g_list.getQuery({orderby:true});\n\t \n\tvar gr = new GlideRecord('sys_export_definition');\n\tgr.setValue('name', 'ed_t_'+tableName);\n\tgr.setValue('filter', query);\n\tgr.setValue('field_list', fields);\n\tgr.setValue('table_name', tableName);\n\tvar sysId = gr.insert();\n\t\n\tif(!sysId){\n\t\talert(\"Failed to create temporary export definition based on list view.\");\n\t}else{\n\t\tvar url = new GlideURL('sys_export_set.do');\n\t\turl.addParam('sys_id', '-1');\n\t\turl.addParam('sysparm_query', 'export_definition=' + sysId + '^name=es_t_' + tableName);\n\t\turl.addParam('sysparm_easy_export', 'true');\n\t\turl.addParam('sysparm_table', tableName);\t\t\n\t\twindow.location = url.getURL();\n\t}    \t\t\t\t\t\n} \n","463d0a00ff220000dadad1cb127f9dc3":"function showSecurityRules(tableName) {\n   var tableDef = Table.get(tableName);\n   var tables = tableDef.getTables();\n   var query = 'name=*^ORnameSTARTSWITH*.';\n   for (var i = 0;i < tables.length;i++)\n        query += '^ORname=' + tables[i] + '^ORnameSTARTSWITH' + tables[i] + '.';\n   var url = new GlideURL('sys_security_acl_list.do');\n   url.addEncodedString('sysparm_query=' + query);\n   window.location = url.getURL();\n}\n","5333d89053301300edf6296906dc3483":" \nfunction editPersonalFilters() {\n   var url = new GlideURL(\"sys_filter_list.do\");\n   url.addEncodedString(\"sysparm_query=table%3D\" + g_list.tableName + \"^user%3D\" + g_user.userID);\n   self.location = url.getURL();\n}\n","5402b80e9fa322005cf3ffa4677fcf10":"runContextAction();\n function runContextAction() {\n    var exportHandler = new ContextMenuExportHandler(g_list,'unload_json');\n    exportHandler.exportRecords();\n }\n \n","5d93ba0047331100ba13a5554ee490c6":"runContextAction();\nfunction runContextAction() {\n\tvar query = g_list.getQuery({ orderby: true, fixed: true });\n\tif (g_list.getRelated())\n\t\tquery = g_list.getRelatedQuery() + (query ? \"^\" + query : \"\");\n\tvar url = new GlideURL('$vtb_get.do');\n\turl.addParam('sysparm_action', 'board_show');\n\turl.addParam('sysparm_field', g_fieldName);\n\turl.addParam('sysparm_table', g_list.getTableName());\n\turl.addParam('sysparm_query', query);\n\twindow.location = url.getURL();\n}\n","731a31e7bf460100e628555b3f073957":" \n","96b2f2ebd71231008d7dc23c5e61031f":" function showWorkflows(query) {  \n   var url = new GlideURL('wf_workflow_version_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query );\n   url.addParam('sysparm_domain_restore', 'false');\n \n   window.location = url.getURL();\n }\n","a3a9bf900a0a0b300030941abc7b2697":"function showBusinessRules(query) {\n   var url = new GlideURL('sys_script_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n   window.location = url.getURL();\n}\n","ab7f76d70ad33702005f177f6d3a7145":"runContextAction();\nfunction runContextAction() {\n   g_list.sort(g_fieldName);\n}\n","ab8369ac0ad337020058ada2a743863a":"runContextAction();\nfunction runContextAction() {\n   g_list.sortDescending(g_fieldName);\n}\n","b0b807c087702100deddb882a2e3ece0":"popAddMetadataDialog(); \nfunction popAddMetadataDialog() {\t\n  \tvar dialog = new GlideModal('add_selected_metadata_link_dialog');\n    dialog.setTitle(new GwtMessage().getMessage('Create Application Files from Records'));\n    dialog.setPreference('current_query', g_list.getQuery());\n\tdialog.setPreference('current_table', g_list.getTableName());\n\tdialog.render();\n}\n","b16a46bd0a0a0bbb007f8195366a63c0":"function changeView(view) {\r\n   var url = new GlideURL(g_list.getTableName() + '_list.do');\r\n   url.addParam('sysparm_view', view);\r\n   url.addParam('sysparm_userpref.' + g_list.getTableName() + '_list.view', view);\r\n   url.addParam('sysparm_userpref.' + g_list.getTableName() + '.view', view);\r\n   url.addParam('sysparm_query', g_list.getQuery({groupby: true}));\r\n   url.addParam('sysparm_fixed_query', g_list.getFixedQuery());\r\n   window.location = url.getURL();\r\n}\n","b179cdcb0a0a0bbb0042ab71456d775d":"function groupList(fieldName) {\n   g_list.setGroupBy(fieldName);\n   g_list.refresh(1);\n}\n","c114e6d10a0a0b3e0032ce8cea45faff":" function showClientScripts(query) {  \n    var url = new GlideURL('sys_script_client_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n \n   window.location = url.getURL();\n }\n","c11e69b40a0a0b3e00bd78e48646fb7f":"function showUIPolicies(query) {\n   var url = new GlideURL('sys_ui_policy_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n   \n   window.location = url.getURL();\n}\n","c120f2730a0a0b3e00a2cca96313f847":"function showUIActions(query) {\n   var url = new GlideURL('sys_ui_action_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n   \n   window.location = url.getURL();\n}\n","c1228d760a0a0b3e00046e56dbd30d49":"function showDictionary(query) {\n   var url = new GlideURL('sys_dictionary_list.do');\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_query', query);\n   url.addParam('sysparm_domain_restore', 'false');\n   \n   window.location = url.getURL();\n}\n","c144b37c0a0a0b3e00949d7e31182a94":" \nrunContextAction();\nfunction runContextAction() {\n   var url = new GlideURL('slushbucket.do');\n   url.addParam('sysparm_view', g_list.getView());\n   url.addParam('sysparm_referring_url', g_list.getReferringURL());\n   url.addParam('sysparm_form', 'list');\n   url.addParam('sysparm_user_list', g_list.isUserList().toString());\n   url.addParam('sysparm_list', g_list.tableName);\n   url.addParam('sysparm_collection', g_list.getParentTable());\n   var rel = g_list.getSubmitValue('sysparm_collection_relationship');\n   if (rel)\n      url.addParam('sysparm_collection_relationship' , rel);\n   \n   window.location = url.getURL();\n}\n","c229daa70a0a0b3e00bfd5294a92cb0e":"runContextAction();\nfunction runContextAction() {\n   var g = new GlideDialogWindow('Calculations');\n   g.setTitle(g_fieldLabel + ' (calculations)');\n   g.setDialog('personalize_aggregate');\n   g.setPreference(\"sysparm_list\", g_list.tableName);\n   g.setPreference(\"sysparm_list_element\", g_fieldName);\n   \n   var view = g_list.view;\n   if (!view)\n      view = '';\n   g.setPreference(\"sysparm_list_view\", view);\n   \n   var collection = g_list.getParentTable();\n   if (!collection)\n      collection = '';\n   g.setPreference(\"sysparm_list_parent\", collection);\n   \n   var rel = g_list.getSubmitValue('sysparm_collection_relationship');\n   if (!rel)\n      rel = '';\n   g.setPreference(\"sysparm_list_relationship\", rel);\n   g.render();\n}\n","c28441330a0a0b3e009ac756d9348c5a":"runContextAction();\nfunction runContextAction() {\n   var query;\n   var parentName = g_list.getParentTable();\n   if (parentName) {\n      var query = 'name=' + g_list.getParentTable();\n      query += '^related_list=' + g_list.getRelated();\n   } else\n      query = \"name=\" + g_list.getTableName() + \"^related_list=\";\n   var url;\n   if (!g_list.isEmbedded())\n      url = new GlideURL('sys_ui_list_control.do');\n   else\n      url = new GlideURL('sys_ui_list_control_embedded.do');\n   url.addParam('sys_id', g_list.getListControlID());\n   if (query)\n      url.addEncodedString(\"&sysparm_query=\" + query);\n   window.location = url.getURL();\n}\n","c8c2eae10a0004e30084537138ba00ed":"\r\nexpandThisColumn();\r\nfunction expandThisColumn() {\r\n  var cp = getPreference('workflow.expanded.' + g_list.getTableName());\r\n  setPreference('workflow.expanded.' + g_list.getTableName(), cp == 'true' ? 'false' : 'true');\r\n  toggleItems(null, cp);\r\n}\n","d1cd92f20a0a0b3e00b44ff90470380e":" runContextAction();\n  \n function runContextAction() {\n    var exportHandler = new ContextMenuExportHandler(g_list,'unload_csv');\n    exportHandler.exportRecords();\n }\n","d1ceb4790a0a0b3e0086e9a19b8d9657":"runContextAction();\nfunction runContextAction() {\n    var exportHandler = new ContextMenuExportHandler(g_list,'unload_xml');\n    exportHandler.exportRecords();\n}\n","d1e68f410a0a0b3e002c9785414de051":"runContextAction();\nfunction runContextAction() {\n   \n   var sysparm_rows = g_list.grandTotalRows;\n   var num_rows = parseInt(sysparm_rows);\n   var sysparm_query = g_list.getQuery({all: true});\n   \n   var sysparm_view = g_list.view;\n   if (num_rows < g_export_warn_threshold) {\n      var dialog = new GwtPollDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdf');\n      dialog.execute();\n      return;\n   }\n   var dialog = new GwtExportScheduleDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdf');\n   dialog.execute();\n}\n","d1e7d68b0a0a0b3e002f4618e3755d86":"runContextAction();\nfunction runContextAction() {\n   \n   var sysparm_rows = g_list.grandTotalRows;\n   var num_rows = parseInt(sysparm_rows);\n   var sysparm_query = g_list.getQuery({all: true});\n   var sysparm_view = g_list.view;\n   if (num_rows < g_export_warn_threshold) {\n      var dialog = new GwtPollDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdflandscape');\n      dialog.execute();\n      return;\n   }\n   var dialog = new GwtExportScheduleDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdflandscape');\n   dialog.execute();\n}\n","d1e8971a0a0a0b3e00c9e1fc881affd3":"runContextAction();\nfunction runContextAction() {\n   var sysparm_rows = g_list.grandTotalRows;\n   var num_rows = parseInt(sysparm_rows);\n   var sysparm_query = g_list.getQuery({all: true});\n   \n   var sysparm_view = g_list.view;\n   if (num_rows < g_export_warn_threshold) {\n      var dialog = new GwtPollDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdf+');\n      dialog.execute();\n      return;\n   }\n   var dialog = new GwtExportScheduleDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdf+');\n   dialog.execute();\n}\n","d1e93cc80a0a0b3e007e913c2485c9e1":"runContextAction();\nfunction runContextAction() {\n   \n   var sysparm_rows = g_list.grandTotalRows;\n   var num_rows = parseInt(sysparm_rows);\n   var sysparm_query = g_list.getQuery({all: true});\n   \n   var sysparm_view = g_list.view;\n   if (num_rows < g_export_warn_threshold) {\n      var dialog = new GwtPollDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdf+landscape');\n      dialog.execute();\n      return;\n   }\n   var dialog = new GwtExportScheduleDialog(g_list.tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_pdf+landscape');\n   dialog.execute();\n}\n","e1990773c0a80a6d0f81499a5c80c069":"runContextAction();\nfunction runContextAction() {\n   var ajax = new GlideAjax(\"RowFieldQueryTerm\");\n   ajax.addParam('table', g_list.tableName);\n   ajax.addParam('field_name', g_fieldName);\n   ajax.addParam('sys_id', g_sysId);\n   ajax.addParam('oper', '>=');\n   ajax.getXML(rowAndFieldQueryTermResponse, \"\", g_list.listID);\n}\nfunction rowAndFieldQueryTermResponse(response, listID) {\n   if (!response || !response.responseXML)\n      return;\n   var items = response.responseXML.getElementsByTagName(\"item\");\n   var item = items[0];\n   if (!item)\n      return;\n   var term = item.getAttribute(\"term\");\n   var list = GlideList2.get(listID);\n   list.addFilter(term);\n   list.refresh(1);\n}\n","e1d5cb8ec0a80a6d006da0404916035e":"runContextAction();\nfunction runContextAction() {\n   var ajax = new GlideAjax(\"RowFieldQueryTerm\");\n   ajax.addParam('table', g_list.tableName);\n   ajax.addParam('field_name', g_fieldName);\n   ajax.addParam('sys_id', g_sysId);\n   ajax.addParam('oper', '<=');\n   ajax.getXML(rowAndFieldQueryTermResponse, \"\", g_list.listID);\n}\nfunction rowAndFieldQueryTermResponse(response, listID) {\n   if (!response || !response.responseXML)\n      return;\n   var items = response.responseXML.getElementsByTagName(\"item\");\n   var item = items[0];\n   if (!item)\n      return;\n   var term = item.getAttribute(\"term\");\n   var list = GlideList2.get(listID);\n   list.addFilter(term);\n   list.refresh(1);\n}\n","e4ce64f0c3303000bac1addbdfba8f42":"function showTable(table) {\n    var url = new GlideURL('sys_db_object.do');\n    url.addParam('sys_id', table);\n    url.addParam('sysparm_refkey', 'name');\n    url.addParam('sysparm_domain_restore', 'false');\n    url.addParam('sysparm_referring_url', g_list.getReferringURL());\n    \n    window.location = url.getURL();\n}\n","eadec6df0a0a0b3e00a3c8b0465c1ed9":" function copyURL(uri) {\r\n      copyRowToClipboard(uri, g_list.tableName, g_sysId, g_list.view); \r\n }\n","eaeb7ec50a0a0b3e00e0a8a429344e86":" runContextAction();\r\n \r\n function runContextAction() {\r\n     copyToClipboard(g_sysId); \r\n }\n","eb6c4d1b0a0a0b3e0029fbb8fee7a7a8":"\r\n","ed38768dc0a80066001cd51eca319cc9":"runContextAction();\nfunction runContextAction() {\n   var ajax = new GlideAjax(\"RowFieldQueryTerm\");\n   ajax.addParam('table', g_list.tableName);\n   ajax.addParam('field_name', g_fieldName);\n   ajax.addParam('sys_id', g_sysId);\n   ajax.addParam('oper', '=');\n   ajax.getXML(rowAndFieldQueryTermResponse, \"\", g_list.listID);\n}\nfunction rowAndFieldQueryTermResponse(response, listID) {\n   if (!response || !response.responseXML)\n      return;\n   var items = response.responseXML.getElementsByTagName(\"item\");\n   var item = items[0];\t\n   if (!item)\n      return;\n\t\t\n   var term = item.getAttribute(\"term\");\n   var list = GlideList2.get(listID);\n   list.addFilter(term);\n   list.refresh(1);\n}\n","ee21f9a7c0a8006600a47b4baccf6a83":"runContextAction();\nfunction runContextAction() {\n   var ajax = new GlideAjax(\"RowFieldQueryTerm\");\n   ajax.addParam('table', g_list.tableName);\n   ajax.addParam('field_name', g_fieldName);\n   ajax.addParam('sys_id', g_sysId);\n   ajax.addParam('oper', '!=');\n   ajax.getXML(rowAndFieldQueryTermResponse, \"\", g_list.listID);\n}\nfunction rowAndFieldQueryTermResponse(response, listID) {\n   if (!response || !response.responseXML)\n      return;\n   var items = response.responseXML.getElementsByTagName(\"item\");\n   var item = items[0];\t\n   if (!item)\n      return;\n\t\t\n   var term = item.getAttribute(\"term\");\n   var list = GlideList2.get(listID);\n   list.addFilter(term);\n   list.refresh(1);\n}\n","eeca263ac0a80066000245d1d9169203":"\r\n","f13f0041473012003db6d7527c9a71f0":" runContextAction();\n function runContextAction() {\n    var exportHandler = new ContextMenuExportHandler(g_list,'unload_excel_xlsx');\n    exportHandler.exportRecords();\n }\n"}});

GlideMenu.addScripts({"onScripts":{},"scripts":{"26a64f613718030003a08fb77e41f193":" function showFlows(tableName) {\t\n\t var query = 'sys_id=javascript:sn_flow.AssociatedFlows.getFlows(\"'+tableName+'\")^active=true';\n\t var url = new GlideURL('sys_hub_flow_list.do');\n\t url.addParam('sysparm_referring_url', g_list.getReferringURL());\n\t url.addParam('sysparm_query', query );\n\t url.addParam('sysparm_domain_restore', 'false');\n\t window.location = url.getURL();\n }\n"}});

messages.set('Timing Type');
messages.set('Time Range');
messages.set('Total Time');
messages.set('{0}ms');
messages.set('{0} ms');
messages.set('Browser response time');
messages.set('Server');
messages.set('Timing details');
messages.set('{0} of {1} {2}: {3}');
messages.set('{0} of {1} Other: {2}');
messages.set('Show Timing Breakdown');
messages.set('Browser timing detail');
messages.set('Time');
messages.set('Other');
messages.set('Timing details breakdown');
messages.set('Response time(ms): {0}');
messages.set('Network: {0}');
messages.set('Network: {0}ms');
messages.set('Server: {0}');
messages.set('Server: {0}ms');
messages.set('Browser: {0}');
messages.set('Browser: {0}ms');
messages.set('Response time','Response Time');
messages.set('Cache/DNS/TCP');
messages.set('DOM Processing');
messages.set('Script Load/Parse');
messages.set('CSS and JS Parse');
messages.set('Form Sections');
messages.set('UI Policy - On Load');
messages.set('Client Scripts - On Load');
messages.set('Client Scripts - On Change (initial load)');
messages.set('Browser processing before onload');
messages.set('DOMContentLoaded to LoadEventEnd');
messages.set('addLoadEvent functions');
messages.set('Related Lists');
messages.set('Related Lists (sync)');
messages.set('Related Lists (async)');
messages.set('onLoad');
messages.set('Unload');
})()

var g_serverTime = parseInt("199") + parseInt("0");
            var g_logClientViewRoles = "";

			// do not do this for the navigation menu
            if (window.name != 'gsft_nav') {
				 addAfterPageLoadedEvent(function() {
					 if (window.performance)
						setTimeGraph();
					 else 
						firePageTimer();
				 });
			 }
			 
			function setTimeGraph() {
				if (window.performance.timing.loadEventEnd > 0)
			 		firePageTimer();
			 	else 
			 		setTimeout(setTimeGraph, 300);
			 }
			 
			function firePageTimer() {
				 if (window.performance && performance.timing.requestStart != performance.timing.responseStart) {
				 	var p = performance.timing;

				 	CustomEvent.fire('page_timing', { name: 'SERV', ms: p.responseEnd - p.requestStart});
				 	CustomEvent.fire('page_timing', { name: 'REND', ms: (p.loadEventEnd - p.responseEnd) });
				 	CustomEvent.fire('page_timing_network', { name: 'NETW', ms: (p.responseEnd - p.navigationStart) });
				 } else {
				    CustomEvent.fire('page_timing', { name: 'SERV', ms: g_serverTime });
					CustomEvent.fire('page_timing', { name: 'REND', startTime: g_loadTime });
					CustomEvent.fire('page_timing_network', { name: 'NETW', loadTime: g_loadTime });
				 }CustomEvent.fire('page_timing_show', {
						isFixed: '', 
						show: '' 
					 });var o = {};
	      o.types = {};o.types['SECT'] = true;o.types['RLV2'] = true;o.types['UIOL'] = true;o.types['CSOL'] = true;
	
	      o.transaction_id = 'a4286a81539f12104d8731f0a0490e94';
	      o.table_name = 'change_request';
	      o.form_name = 'sys_form_template';
	      o.view_id = 'Default view';
	      o.logged_in = true;
	      o.win = window;
	      CustomEvent.fire('page_timing_client', o);}
			 
            // The following line is used to set the time when we start requesting a new page
            Event.observe(window, 'beforeunload', function() {
				new CookieJar({sameSite: 'strict'}).put('g_startTime', new Date().getTime());
                CustomEvent.fireTop('request_start', document);
            });

            // simple pages fire this (stats.do, etc.)
            CustomEvent.observe('simple_page.unload', function() {
            }); 

            // indicate we have completed the request (used by RequestManager.js for cancel widget)
            addLoadEvent(function() {
            	CustomEvent.fireTop("request_complete", window.location);
            });

messages.set('This filter query cannot be edited');
messages.set('Go to');
messages.set('Filter Limit Reached');
messages.set('Changes have been made. Continuing will discard the changes.');
messages.set('Open new window');
messages.set('List editing disabled - to enable, click the gear icon at top of list');
messages.set('URLs/query omit relationship to parent record');
messages.set('The following mandatory fields are not filled in');
messages.set('Pin the filters');
messages.set('Search');
messages.set('Showing 1 through {0} of {1}');
messages.set('There is a cell editor open on this page. Continuing will discard the changes.');
messages.set('There is a cell editor open on this page, continuing will discard the changes');
messages.set('Changes have been made, continuing will discard the changes');
messages.set('Copy query');
messages.set('The filter you are using is too big. Remove some conditions to make it smaller.');
messages.set('a day,%d days');
messages.set('Unpin the filters');
messages.set('Security does not allow the execution of that action against the specified record');
messages.set('Copy URL');
messages.set('Attachments are not allowed');
messages.set('Security allows the execution of that action against {0} of {1} records. Proceed?');
messages.set('--None--');
})()

position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;

<div class="popup popup_form" style=""><iframe src="$src" style=""></iframe></div>

 Search Knowledge To activate press Enter. On Enter opens in a new window

Current stage New 1 of 8 Next stage Assess 2 of 8 Next stage Authorize 3 of 8 Next stage Scheduled 4 of 8 Next stage Implement 5 of 8 Next stage Review 6 of 8 Next stage Closed 7 of 8 Next stage Canceled 8 of 8

Search Knowledge To activate press Enter. On Enter opens in a new window

01:00.0 RAID bus controller: Adaptec AAC-RAID has failed on PSORA1 and needs to be replaced immediately.

width: 100%; resize: none; overflow: hidden; overflow-wrap: break-word; height: 64px;

position: absolute; inset: -999px auto auto 0px; border: 0px; padding: 0px; box-sizing: content-box; overflow-wrap: break-word; overflow: hidden; transition: none 0s ease 0s; height: 0px !important; min-height: 0px !important; font-family: "Source Sans Pro", Arial, sans-serif; font-size: 14px; font-weight: 400; font-style: normal; letter-spacing: 0px; text-transform: none; word-spacing: 0px; text-indent: 0px; line-height: 17.5px; width: 858.484px;

01:00.0 RAID bus controller: Adaptec AAC-RAID has failed on PSORA1 and needs to be replaced immediately.undefined

position: absolute; inset: -999px auto auto 0px; border: 0px; padding: 0px; box-sizing: content-box; overflow-wrap: break-word; overflow: hidden; transition: none 0s ease 0s; height: 0px !important; min-height: 0px !important; font-family: "Source Sans Pro", Arial, sans-serif; font-size: 14px; font-weight: 400; font-style: normal; letter-spacing: 0px; text-transform: none; word-spacing: 0px; text-indent: 0px; line-height: 17.5px; width: 857.078px;

Fail PSORA1 to DR systemShutdown SystemRemove failed RAID cardInstall new RAID cardBoot systemConfigure RAID cardBring system onlineValidate access to disk structuresFailback from DR to PSORA1

Fail PSORA1 to DR systemShutdown SystemRemove failed RAID cardInstall new RAID cardBoot systemConfigure RAID cardBring system onlineValidate access to disk structuresFailback from DR to PSORA1undefined

height: 0px; visibility: hidden; display: none; position: absolute; z-index: -1;