?
Solved

Change Entity Ownership for custom entity

Posted on 2010-09-23
12
Medium Priority
?
1,412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 30

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 30

Accepted Solution

by:
Feridun Kadir earned 1000 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 30

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 1000 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 30

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part II
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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