Service Desk Practitioners Forum
cancel

How to mass un-relate SP Accounts from Person?

Highlighted
Jan Gunnar Helg
Honored Contributor.

How to mass un-relate SP Accounts from Person?

We need to do a cleanup of SP Accounts. Before we can remove them we need to unrelated them from the person. But I'm having trouble doing this as:

- Not possibly to choose Account via Update All
- Not possibly to choose Account via DB or UI rule
- Not possible to pass [EMPTY] as a statement in a data exchange

Any ideas?
4 REPLIES
Jan Gunnar Helg
Honored Contributor.

Re: How to mass un-relate SP Accounts from Person?

I figured it out :)

You can blank out a field using sd_event by passing -v ACCOUNT=""

Now I just need to create a simple app that can run this command one time for every user based on my list.
Radovan Skolnik
Acclaimed Contributor.

Re: How to mass un-relate SP Accounts from Person?

I would do it through database update - just blank the field in Person table that references the account.
Jan Gunnar Helg
Honored Contributor.

Re: How to mass un-relate SP Accounts from Person?

Yes ofcourse one could do it directly in the DB but thats is a very bad idea as you will loose support from HP because you have modified data in the DB level. And also very easy to loose track of things.

I am quite adament in keeping 100% integrity in our system so if there is a way to change something other than doing modifications directly in the DB this should always be prefered.
Radovan Skolnik
Acclaimed Contributor.

Re: How to mass un-relate SP Accounts from Person?

Jan,

the support can be lost if you do a database change that breaks database integrity or change the database structure. None of these would happen (not talking about the fact there is no way HP would be able to find you did such thing).

SD relies on database to maintain integrity of the data (unlike SM7 or Remedy for example). You cannot delete/update any data from SD that would break database integrity and (almost) vice-versa: when the database integrity is OK, SD will be happy. Why I used almost? In some cases SD prevents you from relating 2 things that would be perfectly "relatable" on DB level but in SD it wouldn't make sense. Most obvious case would be for example making ServiceCall its own SubcontractCall ;-)

All in all - the DB update I mentioned would be perfectly OK. Question remains why you want to unrelate all SP accounts from Person records? Do you want to relate application accounts to them? If so DB update is your best choice. Not for creation of app accounts but for changing those existing SP accounts into application. That way you don't loose history of actions users have already taken...