Note: This solution applies DocuShare 6.6.1
Issue
Received the following error when trying to delete a custom object. Received an Error code 1538 while deleting a custom property.
Stack Trace :
1538: Cannot add a required property to a class where there are instances of that class and the required property does not come with a default value.
Reason / Possible Cause
This error usually occurs when there is a custom document object created.
You cannot delete a custom object class if there are instances of that custom object anywhere on your site. You must first locate and delete from your site, all instances of the custom object before you can delete the custom object class. Also, deleted instances in the trashcan will need to be expunged.
Solution
Any objects that have the custom property applied, must be deleted and expunged from DocuShare.
1. Check the Site Statistics for the Custom Object.
a. Click the Site Statistics link on the DocuShare Home Page that is listed at the bottom of the page under the Related Links. The DocuShare Statistics page displays.
b. Under Type of Object check to see if there are any instances of the Custom Object. If there are take note of how many there are.
Note: You may need to check the site statistics again after you believe you have deleted all the custom objects to be sure that it is at 0 before trying to delete the custom object from DocuShare again.
2. Search for all objects of the Custom type.
a. From the DocuShare Home Page, type the custom object name in the search box. (case sensitive)
b. Click Search button. The Search Results page displays.
c. If custom object documents are found delete them.
Note: The custom objects will also need to be expunged from DocuShare.
3. Delete Orphaned Objects (if any)
a. Log into DocuShare as admin.
b. From Admin Home, click Content Management | Orphaned Content | List Orphans. The List Orphans page displays.
c. Verify if any document with the custom property exists. If yes, delete them.
4. Delete Custom Objects from Trashcan.
a. Click Admin Home | Content Management | Trashcan | Trashcan Contents. The Trashcan Contents page displays.
b. Expunge the deleted items of that custom property if any.
Warning: Deleting a collection or workspace will delete all its contents, including any items deleted at a different time.
5. Try deleting the custom object again.
a. Click Admin Home | Object Properties | Custom Object. The Custom Object page displays.
b. In the Custom Objects drop down menu select the custom object and click the Edit button. The custom object Property Values will display.
c. Click Delete Object button.
d. Click Admin Home | Object Properties | Update Properties. The Update Properties page displays.
e. Click the Submit button.
Solution Published: December 18th, 2013
Solution ID: 1429