Unique key violation detected by ((conn=568378) Duplicate entry '167f4dbd47eb9e50a86d8810326d8810326

BenjaminY
Tera Contributor

Hello,

working on a bug that is showing this error when a record producer request is submitted via catalog.
Unique key violation detected by ((conn=568378) Duplicate entry '167f4dbd47eb9e50a86d8810326d8810326' for key 'Primary')

Found duplicates via record producer script but error still occurring after removal.
please advise.

BenjaminY_0-1738860194010.png


 



3 REPLIES 3

DrewW
Mega Sage
Mega Sage

Going to need to see the script to really know what the issue is but typically this is caused by updating or inserting the record in the producer script.

BenjaminY
Tera Contributor
This is what is within the record producer script:

current.request_type_ind =
'Extension';
current.case_summary = producer.case_summary;
current.can_specify_cp_record_nbr_ind = producer.do_you_know_the_cp_record_number;
current.extention_v_last_name = producer.extention_victim_last_name;
current.extention_v_first = producer.extention_victim_first_name;
current.extention_v_last_nammiddle_nam0 = producer.extention_victim_middle_name;
current.extealias = producer.extention_victim_alies;
current.alien_number = producer.a_number;
current.secondary_entry_afile_number = producer.please_provide_a_number;
current.externail_vaddress_line_1 = producer.address_line_1;
current.externaladdress_line_2 = producer.ext_victim_address_line_2;
current.extend_v_city = producer.ext_victim_city;
current.extend_v = producer.ext_victim_state;
current.case_status = producer.case_status_justification;
current.purpose_of_extension = producer.purpose_of_extension;
current.request_duration_ind = producer.how_long_was_the_request;
current.extend_case_agency_last_name = producer.ext_case_agent_last_name ;
current.extend_case_agency_first = producer.ext_case_agent_last_name_first_name ;
current.extend_case_agency_midd = producer.ext_case_agent_middle_name ;
current.extend_case_agency_e_a = producer.ext_case_email ;
current.extend_case_agency_daytime_phone_number = producer.ext_case_agent_phone_number ;
current.vwc_last_name = producer.wc_ext_last_name;
current.vwc_email_address = producer.wc_ext_email;
current.vwc_first_name = producer.wc_ext_first_name;
current.vwc_daytime_phone_number = producer.wc_ext_phone_number;
current.vwc_middle_name = producer.wc_ext_middle_name;
current.ext_social_security_number = producer.ext_social_security_number;
current.ext_date_of_birth = producer.ext_date_of_birth;
current.ext_country_of_citizenship = producer.ext_country_of_citizenship;
current.ext_gender = producer.ext_gender;
current.ext_country_of_birth = producer.ext_country_of_birth;
current.extend_case_agency_extention = producer.ext_lead_case;
current.vwc_ext = producer.vw_ext_officer;
current.ext_supervisor_name = producer.ext_supervisor_full_name;
current.ext_select_your_sac_officer = producer.ext_select_your_sac_office;
current.ext_names_of_sac_approver = producer.ext_name_s_of_sac_approver;
current.record_status = 'Program Manager Approval';
current.criminal_history_extention_attachment = producer.please_attach_criminal_history_extention;
current.please_attach_a_completed_uscis_form_i_102_extention = producer.uscis_form_i_102_extention;
current.form765_extention = producer.attach_i_102_extention;
current.requested_by = gs.getUserID();
current.requester_email = gs.getUser().getEmail();
current.short_description = "Extension Request for " + producer.extention_victim_last_name + ", " + producer.extention_victim_first_name;
current.secondary_entry_record_number = producer.please_provide_the_record_number;
current.is_monitoring_case_officer_aggisned_external = producer.is_there_a_monitoring_case_officer_assigned_to_this_case_extention;
current.is_there_a_victim_witness_coordinator_assigned_extend = producer.is_there_a_victim_witness_coordinator_assigned_to_this_case_extention;
current.lead_officer_last_name = producer.lead_case_last_name ;
current.lead_officer_first_name = producer.lead_case_first_name ;
current.lead_officer_middle_name = producer.lead_case_middle_name ;
current.agency_office_name = producer.lead_case_agency_office;
current.lead_officer_email_address = producer.lead_case_email_address ;
current.ldc_phone_number = producer.lead_case_phone_number ;
current.phone_extension = producer.lead_case_ext ;
current.in_jurisdiction_of_lead_officer_ind = producer.is_the_victim_in_the_same_jurisdiction_as_the_lead_case_agent ;
current.submitting_federal_agency1 = producer.submitting_federal_agency ;
current.sponsoring_fedaral_agency1 = producer.sponsoring_fedaral_agency1 ;
current.sponsoring_agency_free_field = producer.sponsoring_agency_free_field1 ;
current.type_of_trafficking = producer.type_of_trafficking;
current.victim_assistance_program_specialist = producer.victim_assistance_program_specialist;
current.external_request1 = producer.external_request ;
current.civil_action_filing_details_text = producer.provide_details_of_where_and_when_the_civil_action_was_filed;
current.criminal_or_civil_ind = producer.is_this_civil_or_criminal;
current.victims_complaint_file = producer.explanation_of_how_the_individual_meets_the_definition_of_a_victim;
current.litigation_summary_file = producer.one_page_description_of_the_litigation;
current.victims_complaint_date_time = producer.filed_complaint_time_and_time_stamp;

DrewW
Mega Sage
Mega Sage

So you are not doing anything fancy so I would say you are going to need to do some Business Rule debugging to see if there is a BR that is creating a record twice.

 

Your other option is to comment out all of the code and see if that fixes the issue.  If it does then start uncommenting the code 1 line at a time to see when it comes back.  Then look at what that line/field is doing.