Customization and programming tricks by Ronny Van der Snickt

Archive for April, 2009

Unshare accounts in MS CRM

After a company worked for several months with MS CRM, they decided to change security. They didn’t wanted user to be able to share accounts anymore. So far no problem but they wanted to remove all shares made by users.

There is no easy way of doing this, They have +60k accounts and 100 users and it’s impossible to check them all manually. So I had to make a program to unshared the records. My first problem was that it’s not possible to view the shares of a record (Correct me if I’m wrong) through the MS CRM Web Service. I could start and try to unshared all users for all records but that would require over 6.000.000 transactions.

So I looked at the database and tried to find a way to retrieve the share information (This is of course unsupported but my only intention here is to retrieve data from the database.) Read more »