Friday, August 16, 2013

MSCRM - Modify the Parent & Child relationship

Parent & Child relationship of Entities should be well defined at the beginning. If you want to change the entity relationship after data imported to the system, you will find that the relationship of existing records do not automatically re-build as using the new definition.

To resolve this issue, you can using the re-parent setting to re-assign the owner of each records. But if the volume of data is huge, you want to die......

So, another approach is updating the database directly. (But it is an unsupported solution from Microsoft, you need to take your risk!!!)

Example,
You want to remove the Account & Contact Parent & Child Inherited relationship, you need to update the table: (assumed you have already changed the Account & Contact relationship setting to "Cascade none")

update PrincipalObjectAccess
set InheritedAccessRightsMask = 0
where ObjectId in (select contactid from ContactBase)



0 comments:

Post a Comment

Breaking News
Loading...
Quick Message
Press Esc to close
Copyright © 2013 Technology KB All Right Reserved