Monday, March 06, 2017

Strange error when deleting managed Solution

Seems like that Dynamics 365/CRM doesn't catch all dependencies for managed solutions. This is how you can find and remove one of the tricky ones I got when uninstalling a managed solution which was:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: During Solution Uninstall of Solution Id [solution-guid], cannot find any instances of the component with Component Id c97cd9d7-a0fa-4ed5-b360-3c2ad998a620 and Component Type 2.Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>During Solution Uninstall of Solution Id [solution-guid], cannot find any instances of the component with Component Id c97cd9d7-a0fa-4ed5-b360-3c2ad998a620 and Component Type 2.</Message>
  <Timestamp>2017-03-06T13:06:54.6280227Z</Timestamp>
  <ExceptionSource i:nil="true" />
  <InnerFault i:nil="true" />
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

After some thinking I figured that this was probably a reference to an attribute (Component type = 2) with the Guid = c97cd9d7-a0fa-4ed5-b360-3c2ad998a620 so I opened another attribute and then cut-n-pasted the url. And it seemed that you didn't have to worry about the entity guid:


https://<onlineorgname>.<globalcrmcenter>.dynamics.com/tools/systemcustomization/attributes/manageAttribute.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&attributeId=%7bc97cd9d7-a0fa-4ed5-b360-3c2ad998a620%7d&entityId=%7b70816501-edb9-4740-a16c-6a5efbc05d84%7d

Change <onlineorgname> to your org, and <globalcrmcenter> to the crm-subdomain you are using, which for EMEA is crm4.



You will then see the field editor, and can then show the dependencies of the field and remove all of them manually to make sure they are not bothering the Solution uninstall. After that "publish all" and retry removing the solution.


Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se

3 comments:

  1. Hi Gustaf,

    I have one small querry about Ms dynamics CRM Integration with Hybris Marketing??

    I have some questions below?
    1.Do we need to create the webservice in hybris marketing?

    2.Once we create the web service do we need to give the Web service url to CRM???

    3.How they will send the data to marketing system??

    4.Where is field mapping will be done??
    5.How to send the data to hybris marketing??
    6 i need the data whenever anything is created in ms crm data? in real time

    Please help me how to do that ??

    ReplyDelete
  2. Hey, I have same stuation but i ve dependency on lookup field, and i cant delete the depentendcies, so it bloks me apply solution upgrade. Please contact me as soon as possible :) Thanks for your helping.

    ReplyDelete
  3. Hi Erdi,

    What kind of help are you looking for?

    ReplyDelete