locked
Developing two unconnected solutions on one system creates a conflict when I deploy RRS feed

  • Question

  • I have a crm system on which I develop solutions. No problem with that.

    I have developed two solutions in that development system and can deploy those solutions to other CRM systems with no problems. If I deploy two solutions to one system and then try to remove a solution it fails.

    So I have solution A in which I include the user entity because my custom entities in solution A are linked to users. I also have solution B which includes a reference to users because its custom entities are linked to users. Solutions A and B are independent and make no reference to each other. So I have a one : many relationship between users and entity A1 in solution A and a one : many relationship between users and entity B1 in solution B.

    I have now changed the properties of solution B. It was only a prototype and only deployed to two systems so that's reasonable. Essentially I changed a boolean property to be a true boolean whereas previously it was a look up to an option set containing two values. On the system with only solution B I can delete the old solution and reimport, it objects if I just import presumably because a property has been replaced with one of the same name but different type but nonetheless the process works. On the system with solutions A and B I can not import the new solution B without first deleting it which was expected but neither will CRM let me delete solution B because it insists there is a dependancy between the two solutions and insists I have to delete solution A which is not an option as it will destroy data. When I read through the XML it seems that the customisation.XML exported by CRM lists every known entity including the entities from unrelated solutions.

    Is there some special trick to developing multiple solutions in a single CRM system without having them get confused about dependancies?




    • Edited by J N Brand Friday, August 9, 2013 2:59 PM
    Friday, August 9, 2013 2:56 PM

All replies

  • What you are seeing here is that since you've included the system user entity, you will have dependencies on all all user owned entities since there is a ownerid relationship to it. Solutions can't determine as to which relationship belongs to which solution, so it includes them all.

    If you want to create two solutions independently, they really cannot share any dependencies at all - so you can't include the user entity.

    If you do need to include the user entity, you will need to separate your solutions into two different organisations.

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Friday, August 9, 2013 4:20 PM
    Answerer
  • What type of relationship behavior did you configure for 1:N User to A1 and for User to B1?  What other options have you configured for your A1 and B1 entities?  And your certain that the Solution A's Entities did not contain B1 and Solution B's Entities doesn't have A1?

    I setup a test to see if I could reproduce this behavior:

    Created Solution A with one entity, A1.  A1 is User or Team owned, all checkboxes on entity form unchecked.  A1 also has a custom N:1 relationship with User, Referential behavior.

    Then I created Solution B exactly as I created Solution A and then exported both of them as a managed solution.  Both solutions only contained two entities, the user entity and either the A1 or B1 entity but not both.  I then imported both managed solutions into another deployment and was able to uninstall one or the other selectively without issue.  Also, when I look at the customizations.xml in the managed solution's zip file, it only contains one Entity element for systemuser and one Entity for A1/B1.

    Friday, August 9, 2013 4:29 PM
  • What type of relationship behavior did you configure for 1:N User to A1 and for User to B1?  What other options have you configured for your A1 and B1 entities?  And your certain that the Solution A's Entities did not contain B1 and Solution B's Entities doesn't have A1?

    I setup a test to see if I could reproduce this behavior:

    Created Solution A with one entity, A1.  A1 is User or Team owned, all checkboxes on entity form unchecked.  A1 also has a custom N:1 relationship with User, Referential behavior.

    Then I created Solution B exactly as I created Solution A and then exported both of them as a managed solution.  Both solutions only contained two entities, the user entity and either the A1 or B1 entity but not both.  I then imported both managed solutions into another deployment and was able to uninstall one or the other selectively without issue.  Also, when I look at the customizations.xml in the managed solution's zip file, it only contains one Entity element for systemuser and one Entity for A1/B1.

    The only relationship between A1 and user and B1 and user is that solutions A and B asked for user to be included in the solution because I have custom views in both solutions that make it want the user. There is no relationship between the solutions. I have even tried removing almost all entities from the solution until each solution contains only a few custom entities and there is no overlap between them. If I then update solution B on the problematic system and then try to delete solution A from that problematic system it still insists that it is needed by solution B.

    I am confident that each solution is independent because I can install each system independently.

    Tuesday, August 13, 2013 8:57 AM
  • Hi,

    The problem will still be that the user entity contains custom relationships to the custom entities (owner) - which will mean the solutions are a pre-requisite to each other.

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, August 13, 2013 9:08 AM
    Answerer
  • I'd love to think that was the problem because then I could fix it. The only relation between users and solution A is a 1:many relationship from user to entity A1. The only relation between users and solution B is a 1:many relationship from user to entity B1. This does not mean that solution A and solution B are dependant on each other.

    If I try to remove solution A from the problem system I get an error message that tells me solution B is dependant on it and names a relationship and Guid for that relationship. However if I search the customisation.xml for either solution A or B that relationship does not exist. So it appears that the problem system believes they are dependant, for all I know they may have been given a version in the past in which they were dependant but that is not the version on there now, but through a relationship that CRM tells me does not exist. So I am left with a system that won't let me remove a solution or repair it without also removing the working solution but removing that will destroy data.


    • Edited by J N Brand Tuesday, August 13, 2013 11:25 AM
    Tuesday, August 13, 2013 11:20 AM