Solved

Change Entity Ownership for custom entity

Posted on 2010-09-23
12
1,363 Views
Last Modified: 2012-05-10
Hi

Looking for a link or advice on changing the entity ownership of a custom entity from organization to user.  I found some links on CRM 3.0 but need a method (supported or unsupported) to change this in CRM 4.0

Note: recreating the entity is not an option
0
Comment
Question by:apollo7
  • 5
  • 4
  • 3
12 Comments
 
LVL 29

Expert Comment

by:Feridun Kadir
ID: 33754396
I don't think you will get a good answer on this.

One option which I have not tried is to export the custom entity in question and then edit the xml and then import - but I don't if this will work. Also the imported entity will have no data.

I don't think there is anything you can do with the existing entity because to make it user owned requires numerous system maintained relationships which are not present on an organization owned entity. So it is not as simple as just updating a table in the database.
0
 
LVL 15

Expert Comment

by:mshogren
ID: 33754683
You say that recreating the entity is not an option.  I assume that is because you don't want to lose the data.  It may be possible to create a new entity that has the same attributes and then write SQL queries to copy the data from the old entity table to the new one.
0
 
LVL 29

Accepted Solution

by:
Feridun Kadir earned 250 total points
ID: 33754703
It would be possible to do that, the existing data could be copied out to an excel file and then imported back in using the CRM Data import function. A sql table to table copy is not supported as all data management must be done via the CRM platform to ensure the correct relationships are maintained and that guids are generated correctly.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 15

Expert Comment

by:mshogren
ID: 33754838
Certainly my solution would not be supported, but my experience tells me that it is possible to maintain relationships purely by copying the guids in lookup columns.
0
 
LVL 15

Expert Comment

by:mshogren
ID: 33754921
It goes without saying (but I'll say it anyway) that a database backup should be taken before getting started with anything like this
0
 
LVL 29

Expert Comment

by:Feridun Kadir
ID: 33754932
Indeed, agree with both your posts.
0
 
LVL 1

Author Comment

by:apollo7
ID: 33755604
Thanks to both of you, this is helpful information.  If I am stuck with it (i.e. having several custom entities with sensitve data that can be viewed by any business unit), can you think of another way to filter the data?

For example, if I capture the business unit  of the current logged in user, (which I can do with an xml onload) would there be a way to restrict the lookups to the current logged user's business unit.

Otherwise, I will need to rebuild the forms with User ownership.

Thanks again
0
 
LVL 15

Assisted Solution

by:mshogren
mshogren earned 250 total points
ID: 33755647
Hmm, I am not sure how your idea would work, and am pretty certain that if it did it would require a fair bit of effort, maybe even as much as it would to recreate the entities.  

Implementing security in the onload is too easy to circumvent.  A user can still see the data in a view or Advanced Find, and a more savvy user can always find ways around javascript that is used to hide something.
0
 
LVL 1

Author Comment

by:apollo7
ID: 33755705
Good point.  Last question, as far as EE etiquette, what would be the best way to award points?  Both of contributed and helped me reach a decision.  Is it appropriate to split the points and give a grade of A?

Let me  know what you think, I am not that experienced on EE and have had a few disputes - dont like that :)

Thanks for your help.
0
 
LVL 29

Expert Comment

by:Feridun Kadir
ID: 33755744
entirely your call. I'd be happy with an equal split or whatever you feel is appropriate.
0
 
LVL 15

Expert Comment

by:mshogren
ID: 33755781
You won't get any dispute from me.
0
 
LVL 1

Author Closing Comment

by:apollo7
ID: 33760516
Thanks to you both, good information and advice.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question