So after my testing with role based security, it became obvious that the entities that are newly created should be given team or user based ownership to ensure the security would be used correctly.
However what if you already have entities created and are unwilling to drop and recreate the entity?
I have to preface this by saying this is unsupported by Microsoft but will do the trick.
The key is updating not only the customizations xml file but also the EntityView in the SQL database.
To do this you will need the proper role such as System Administrator.
1. Gather the necessary xml needed to add owner columns and a team relationship. I find this easier if you can create a sample entity that is user or team owned and copy the specific xml. Always keep a backup of your initial solution to ensure you can roll back.
2. Locate the EntityView inside your database. Navigate to the specific entity in question. Notice the OwnershipTypeMask column. This will be set to 8 and will be updated to 1.
3. Update the EntityView record to OwnershipTypeMask to 1.
4. Once this is done, you can now push your updates to CRM using the solution. The next steps will help you attempt to locate the nodes you need to update.
5. Add the atrributes you gathered from the test entity. These include
6. Scroll to the <OwnershipTypeMask> node. If you are using a solution exported from before your sql change, you will have to change the value to say UserOwned.
7. Add to the EntityRelationship section of the file. Again, if you have the test entity do a search for team_ and it should find it. Duplicate this and insert accordingly.
I would only attempt this if you are familiar with modifying the customizations file extensively. One wrong move and you will have to try various routes to revert back.
It can be done but the road is slippery when wet! :)