Trying to have incident auto-route. Tried BR, Assignment Rules and nothing is working

Andrew Meza
Tera Expert

Hello,

 

I am trying to get my incidents to auto route based of category. If the category is Security Vulnerability (DDI) I want to the assignment group to go to the info sec assignment group. I tried assignment data lookups, and it works but only on the backend. I need this to work from the Service Portal. When a user submits an incident with this category, I want to the records assignment group to automatically be set to info sec. At the moment they come in unassigned. Am I doing something wrong? Please see my screenshots. In the screenshots when I tested, I would disable one or the other, so these two configurations don't conflict with each other.

 

AndrewMeza_0-1738339120704.pngAndrewMeza_1-1738339133185.pngAndrewMeza_2-1738339160063.png

AndrewMeza_3-1738339171484.png

AndrewMeza_0-1738340295388.png

 

 

 

7 REPLIES 7

@Andrew Meza Can you check the method call 

linkRecordProducerToParentIncident

 

and see if current.setWorkflow(false) is being used here while associated record producer to parent incident inside this method. 

Looking into the linkRecordProducerToParentIncident script include I dont see anything related to current.setWorkflow(false). Here is the script:

 

var LinkRecordProducerToIncident = Class.create();
LinkRecordProducerToIncident.prototype = {
	initialize: function() {
	},

	linkRecordProducerToParentIncident: function(parInc, gr) {
		if (GlideStringUtil.isEligibleSysID(parInc)) {
			var incGr = new GlideRecord("incident");
			if (incGr.get(parInc)) {
				if (gr.isValidField('parent')) {
					gr.parent = parInc;
					var incUrl = "<a href='" + incGr.getLink(true) + "'>" + incGr.getDisplayValue() + "</a>";
					var tableText = gr.getLabel();
					gs.addInfoMessage(gs.getMessage("{0} {1} is created from {2}", [tableText, gr.getDisplayValue(), incUrl]));
				}
			} else {
				var intGr = new GlideRecord("interaction");
				if (intGr.get(parInc)) {
					sn_interaction.RelatedRecord.createOrUpdate(parInc, gr.getRecordClassName(), gr.getUniqueValue(), "Created", "action_insert");
				}
			}
		}
	},

	type: 'LinkRecordProducerToIncident'
};

@Andrew Meza I recommend you to use Script Tracer https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/servicenow_administrator/app_s... to debug why your business rule/Assignment rule is not triggering, it will help you trace the foot prints of Server side script which are being called when you press submit button on the record producer.