Notifications

85 views

Description

When inserting a record into the Time Worked embedded list prior to submitting the record, a unique key violation occurs and the record cannot be submitted. This error only occurs when the com.snc.time_worked.update_task_timer property is set to True.

The error is:

Unique Key violation detected by database (Duplicate entry 'sys_id' for key 'PRIMARY')
Invalid insert

Steps to Reproduce

  1. Navigate to System Properties > All Properties.
  2. Search for com.snc.time_worked.update_task_timer.
  3. Set Value to true.
  4. Navigate to Incident > Create New.
  5. Right-click on the header and select Personalize > Form layout.
  6. Add Time Worked->Task from Available to Selected.
  7. Click Save.
    The Incident form should open.
  8. In the Time Worked embedded list, click Insert a new row and enter any value.
    Ensure that you have not saved the incident record.
  9. Right click on the header and select Save.
    The unique key violation error occurs and your record is not submitted.

Workaround

This is expected behaviour when a business rule on the Task Time Worked table is set as a "Before" rule. Changing it to an "After" rule makes the violation disappear. Creating a related record before creating the current one gives this error, in case there is a before business rule on the related record.

 


Related Problem: PRB590991

Seen In

Berlin Patch 7

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-04-22 05:11:34
Published:2020-04-22