Add on the "Affected CIs" related list on Change form has HTTP 400 Request header is too large" if URL is too longDescriptionWhen table cmdb_class_info has 350+ records all with principal_class=true, this will generate a URL in the Add button of "Affected CIs" related list that is too long to be handled by web browsers.Steps to Reproduce Populate table cmdb_class_info with 350+ records all with principal_class=true. This can be done with script below. var tableName = 'cmdb_ci'; var gr = new GlideRecord('sys_db_object'); gr.addEncodedQuery('super_class.nameLIKE' + tableName); gr.query(); gs.log(gr.getRowCount()); while (gr.next()) { var cmdbCigr = new GlideRecord('cmdb_class_info'); cmdbCigr.setValue('class', gr.name.toString()); cmdbCigr.setValue('principal_class', true); cmdbCigr.insert(); } Click "Add" on the "Affected CIs" related list on Change form has "HTTP 400 Request header is too large" if URL is too long WorkaroundModify script include:AssociateCIToTask method: _getURL from: _getURL: function(chgReqId, addToTable){ this.removeUserFilter(); var latestClassAdded; var parentClass = ""; var principalClassFilter = ""; // latestClassAdded logic // 1. if there are ci's, get the latest class of the ci // 2. default the latest class to parent class if (addToTable === "task_ci") { principalClassFilter = this.getPrincipalClassFilter(chgReqId); if (!principalClassFilter) latestClassAdded = this.getLatestClass(chgReqId); parentClass = this.getParentClass(chgReqId); if (!latestClassAdded) latestClassAdded = parentClass; } else if (addToTable === "task_service_offering") latestClassAdded = "service_offering"; else latestClassAdded = "cmdb_ci"; var url = new GlideURL("task_add_affected_cis.do"); url.set("sysparm_crSysId", chgReqId); url.set("sysparm_view", "associate_ci"); url.set("sysparm_add_to", addToTable); url.set("sysparm_stack", "no"); url.set("sysparm_table", latestClassAdded); url.set("sysparm_parent_class", parentClass); url.set("sysparm_fixed_query", principalClassFilter); return url; }, To: _getURL: function(chgReqId, addToTable){ this.removeUserFilter(); var latestClassAdded; var parentClass = ""; var principalClassFilter = ""; // latestClassAdded logic // 1. if there are ci's, get the latest class of the ci // 2. default the latest class to parent class if (addToTable === "task_ci") { principalClassFilter = this.getPrincipalClassFilter(chgReqId); if (!principalClassFilter) latestClassAdded = this.getLatestClass(chgReqId); parentClass = this.getParentClass(chgReqId); if (!latestClassAdded) latestClassAdded = parentClass; } else if (addToTable === "task_service_offering") latestClassAdded = "service_offering"; else latestClassAdded = "cmdb_ci"; var url = new GlideURL("task_add_affected_cis.do"); url.set("sysparm_crSysId", chgReqId); url.set("sysparm_view", "associate_ci"); url.set("sysparm_add_to", addToTable); url.set("sysparm_stack", "no"); url.set("sysparm_table", latestClassAdded); url.set("sysparm_parent_class", parentClass); url.set("sysparm_fixed_query", principalClassFilter); return new GlideTinyURL().createTinyURL(url); },Related Problem: PRB1528002