---
title: "Troubleshooting Edits to the \"Documents\" grid"
canonical: "https://servicedesk.maxgeo.com/space/LC/1263337514/Troubleshooting%20Edits%20to%20the%20%22Documents%22%20grid"
format: markdown
---
<u>**Problem:**</u>

1. At time of saving the changes the following error is returned:
  - <span style="color: #bf2600">"Violation of PRIMARY KEY constraint 'DOCREG_PK'.  Cannot insert duplicate key in object 'dbo.LMS_DOCREG_DocumetnRegister'" </span>- DBAs should refer to **Troubleshooting 2**, all other Users should refer to **Troubleshooting 1**.
  - <span style="color: #bf2600">"Please complete all required fields.  You may need to reset the grid to unhide any required fields."</span> - start at **Troubleshooting 3**.

<u>**Troubleshooting:**</u>

<span style="color: #ff5630">*Only suitably experienced and qualified SQL professionals should be accessing the database via SQL Management Studio (*</span><span style="color: #ff5630">***SMSS***</span><span style="color: #ff5630">*) or similar services.  No changes to data should be made through these means unless via a script issued by Maxwell GeoServices which has been independently tested before put into production.*</span>

1. Confirm that the primary key being used by the software (will be within the error message), then have the re-attempt the save and check the primary key again.  You should then have your DBA confirm the primary keys are currently in use as per **Troubleshooting 2**.
  - If you do not have a DBA, contact servicedesk.maxgeo.com noting that we will require access to your database.
2. The user should supply you with the relevant primary key(s) that are being generated as per **Troubleshooting 1**.  From there, check the database to determine if these primary key(s) are already in use as the error claims (refer: table dbo.LMS_DOCREG_DocumentRegister field DOCREG_ID).  You then have sufficient data for us to be able to supply a fix - contact [servicedesk.maxgeo.com](http://servicedesk.maxgeo.com).
3. Confirm the field Document Name has been completed.
  - If it has ***not ***been completed: this is the cause of the error - it is a required field and therefore must be completed.
4. Try deleting the unsaved rows of data that you've tried to save, save the record, close the record, reopen and try again.
  - If this resolved the error your troubleshooting is complete.
  - If you could not save changes to the record before closing, the Documents data grid may not be the cause of the error.  Have a look at other data grids in this record that you have edited recently.
  - If you cannot resolve the issue contact us at [servicedesk.maxgeo.com](http://servicedesk.maxgeo.com)