Error thrown when trying to delete a user

Before I begin, I will say I am just messing around with a trial version of Ayanova.

I try to delete a user and and error gets thrown:

This object can not be deleted because it is linked to one or more related objects.


The DELETE statement conficted with the REFERENCE constraint.

I understand that it is not allowing my to delete it because it is a foreign key in other tables. I just wanted to know if there was a way to delete a user or any item for that matter without it throwing this error. Do I have to first relieve it of all of objects that the user in questions is affiliated with? Or is it simply the fact that I am using the trial version?

Sorry if this has already been covered or if I’m just having a Monday.

Thanks,

Adam Cleveland

Hi Adam - Happy Monday :slight_smile:

The error is occurring because that user has been selected elsewhere in the AyaNova program - and is tied to other objects.

To prevent database corruption, AyaNova will not let you delete an object (object being a user record, a client record, a part record, etc) that is referred to elsewhere. And lets you know this by returning that error message.

So yes, you would first need to find all areas of the program where this object was selected, and remove that selection.

Do note that it is recommended instead to make the object inactive by deselecting the Active field. This way the history is still there, but no longer available for selection.

Do note that if instead for example, a technician is let go and you have hired someone new, what is recommended is that you make the original user inactive by unchecking the Active field so no longer selectable elsewhere to free up the schedulable user license. Do note though, thatuser must no longer be selected in any non-Closed service workorders, in no quotes or pm’s, nor in any service workorder templates, quote templates, or pm templates. The forum topic http://forum.ayanova.net/Topic4168-112-1.aspxgives you how to.

  • Joyce

Thank you for your incredibly prompt response and thorough answer!

You’ll probably be hearing more from me soon.

Have a good day!