Hiding default entities by tweaking the DB

Answered Hiding default entities by tweaking the DB

  • Friday, October 31, 2008 2:50 PM
     
     
    Hi,

    I'm trying to hide the relationships of a number of default entities. For example, I want to remove the "More addresses" relationship that is in the navbar of a contact. Now I know that I could use some client side javascript to hide this item. However, there still remains the 'add new address' menu item in the actions menu. And I would need some more client side scripting to hide that item. This can all be done and is quite tedious (finding all ids of all dom elements etc.). Now I'm trying to figure out why I can't seem to be able to hide these relationships on the serverside.

    I would seem to think that the relevant tables are:

    MetadataSchema.Entity
    MetadataSchema.Relationship
    MetadataSchema.EntityRelationship
    MetadataSchema.EntityRelationshipRelationships
    MetadataSchema.EntityRelationshipRole

    Now my initial desire was to remove the invoice relationship. And to do that I have been tweaking several columns of the EntityRelationshipRole row associated to the invoice_primary_contact relationship. But somehow I cant seem to manage to hide the darn relationship. Now this could mean to things, I have either not yet found the right place to make the change, or the sidenav items are hardcoded in the asp pages. 

    My question is if anyone has experience with what I am trying to do and perhaps know how to succeed?

    Thanks,

    Ygor


All Replies

  • Saturday, November 01, 2008 8:20 PM
    Moderator
     
     Answered

    Hi Ygor,

     

    The task you're trying to achieve is one which I haven't tried yet, so I cannot give you the answer. What you could do, is to grab the .net reflector and digg into the dlls of CRM to figure out if the navbar item is hardcoded (could be, there are some things hardcoded for sure).

     

    What I do want to warn you for, is the level of unsupportability you're getting into when modifying the database. Instead of doing the unsupported JavaScript, you are changing the database. Whenever you're getting into an unexplainable situation, then it will be very hard to revert to a supported environment for Microsoft support. Also the risk of failures with updates and hotfixes are quite high with doing this kind of changes.

     

    In short, use .net reflector to search for more detail on how to hide the navbar items hardcoded, but be very careful and inform your customer about what implications a change like that has.

     

    With kind regards,

     

    Ronald Lemmen