Unique Key Violation Detected by Database

Rob Sestito
Mega Sage

Hey SN Comm Team,

I am all of a sudden getting the following error:

find_real_file.png

I received this after I made a change to the following BR:

find_real_file.png

**Newest code commented out for now when trying to figure this out**

(function executeRule(current, previous /*null when async*/) {

	var d2 = new GlideDateTime(current.getValue('u_first_letter_sent'));
	d2.addDaysLocalTime(22);
	current.u_second_letter_sent=d2;
	
	var d3 = new GlideDateTime(current.getValue('u_second_letter_sent'));
	d3.addDaysLocalTime(15);
	current.u_third_letter_sent=d3;
	
	//var termLetter = new GlideDateTime(current.getValue('u_third_letter_sent'));
	//termLetter.addDaysLocalTime(8);
	//current.u_authorize_termination_email_sent=termLetter;

})(current, previous);

Even with it commented out, I get the same error repeating when I try to create a case using the HR Service that goes with this BR. I have seen some stuff on the SN Comm talking about current.update - But I don't have that exact script being used. Can someone help me out as to why this error is occuring?

u_authorize_termination_email_sent field is new as of today for this also

Cheers,

-Rob

1 ACCEPTED SOLUTION

Found the issue - system property sn_hr_core.auto_categorization. When I was trying to test by making a LOA Claim case, I was getting those errors I showed in my initial post. The second error "failed to insert record" had me thinking that no case was created. This morning I logged in and saw 9 "test" cases created by me from last yesterday. For some reason when I was trying to create a case using LOA Claim service, the cases were being created under General Inquiry service, using the Total Rewards numbering system and short description.

find_real_file.png

So, these cases were created under the main HR Case COE - Really odd!!

When I jump into one of the cases, I see the following under activities:

find_real_file.png

That makes no sense - if I am selecting the actual service from the Case Creation Page, why would this property kick in to "help".

I went to the property and changed the value to false - created the LOA Claim case just fine. I think I read somewhere that this property has a flaw, and was fixed in Orlando (but I could be wrong and thinking about something else).

Either way, things seem to be working normal now that the property is set to false.

Thanks,

-Rob

View solution in original post

10 REPLIES 10

Found the issue - system property sn_hr_core.auto_categorization. When I was trying to test by making a LOA Claim case, I was getting those errors I showed in my initial post. The second error "failed to insert record" had me thinking that no case was created. This morning I logged in and saw 9 "test" cases created by me from last yesterday. For some reason when I was trying to create a case using LOA Claim service, the cases were being created under General Inquiry service, using the Total Rewards numbering system and short description.

find_real_file.png

So, these cases were created under the main HR Case COE - Really odd!!

When I jump into one of the cases, I see the following under activities:

find_real_file.png

That makes no sense - if I am selecting the actual service from the Case Creation Page, why would this property kick in to "help".

I went to the property and changed the value to false - created the LOA Claim case just fine. I think I read somewhere that this property has a flaw, and was fixed in Orlando (but I could be wrong and thinking about something else).

Either way, things seem to be working normal now that the property is set to false.

Thanks,

-Rob