Solution - ArcFM - Unhandled Exception Delete "field is not nullable"

Version 3


    Attempting to delete a feature results in Microsoft .NET Framework Unhandled Exception ExecuteMultiItemTool error (Delete)


    ************** Exception Text **************


    1. System.ApplicationException: ExecuteMultiItemTool error ( &Delete ) ---> System.Runtime.InteropServices.COMException (0x80041008): Delete.IMMTreeViewTool_Execute:
    2. Delete.DeleteAll:
    3. modDelete.DeleteObject:


    The field is not nullable. [DYNPROTDEVUNITID]-2147217400

    Record deletion  Problem deleting records. Failed to delete relationships for object [ARCFM.DynmaicProtectiveDeviceUnit] The field is not nullable. [DYNPROTDEVUNITID]

    The features could not be deleted. Failed to delete related part objects for composite object. Failed to delete relationships for object. The field is not nullable. End of Feeder Plugin cursor.



    It's a Catch-22 when a feature has a composite relationship to another object (like a table), and the foreign key attribute does not allow nulls. Attempting to delete the feature means the related object also needs to be deleted, but ArcGIS does not allow the deletion because of the field with nulls not allowed.




    Change the field to allow nulls, or re-do the relationship to make it simple rather than complex.