locked
Cascade link type 'NoCascade' is invalid for Delete. while importing customizations

    Question

  • Hi,

    I'm trying to import customizations on a fresh installed MSCRM environment but i'm getting errors while importing the xml contact-customizations file.

    The error is: "Failure: contact_activity_parties: Cascade link type 'NoCascade' is invalid for Delete. "

    My server is running Windows Server 2003 SP2 and SQL2005
    CRM4 is installed with Update Rollup 11

    The customizationxml source is another crm4 server with rollup 11 installed.

    I tried importing customizations for various entities, but all the same.
    I also tried to use different customizationfiles from different servers.
    Even when i export the contact entity and import it to the same server again this error comes up.

    Even googl.. euhh Bing didn't show some helpful information on this so i hope anyone on this forum has seen this before and could help me with a solution.
    If found 1 topic with similar errors but it didn't help me. http://social.microsoft.com/Forums/en/crm/thread/f1caa989-10f3-4ded-9f9a-756cfa0cdd39

    Tracing was enabled while importing and is shown below.

    >Crm Exception: Message: Cascade link type 'NoCascade' is invalid for Delete., ErrorCode: -2147188220
    [2010-07-22 09:03:54.8] Process: w3wp |Organization:12169f83-97fe-4f8f-afeb-71857a8e254c |Thread:  1 |Category: Platform |User: 3ed99d89-3b40-4f82-b35e-140b5f00b98c |Level: Info | MiniDump.CreateDumpInternal
    	at MiniDump.CreateDumpInternal(MiniDumpReasons reason, Exception exception)
    	at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException, Boolean enableTrace)
    	at CrmException..ctor(String message, Int32 errorCode)
    	at RelationshipService.ValidateCascadeLinkTypes(RelationshipDescriptionPropertyBag relationshipDescription, MetadataBusinessEntity referencingEntity, MetadataBusinessEntity referencedEntity)
    	at RelationshipService.ValidateForUpdate(RelationshipDescriptionPropertyBag relationshipDescription, MetadataBusinessEntity oldRelationshipData, MetadataBusinessEntity referencedEntity, MetadataBusinessEntity referencingEntity, MetadataBusinessEntity referencingAttribute, ExecutionContext context)
    	at RelationshipService.UpdateInternal(Guid entityRelationshipId, IRelationshipUpdateInfo relationshipUpdateInfo, MetadataHelper metadataHelper, Boolean mergeLabels, ExecutionContext context)
    	at RelationshipServiceBase.UpdateNoPrivilegeChecks(Guid entityRelationshipId, IRelationshipUpdateInfo relationshipInfo, ExecutionContext context, MetadataHelper metadataHelper, Boolean mergeLabels)
    	at EntityRelationshipService.UpdateNoPrivilegeChecks(Guid entityRelationshipId, IRelationshipUpdateInfo relationshipInfo, ExecutionContext context, MetadataHelper metadataHelper, Boolean mergeLabels)
    	at OneToManyEntityRelationshipProcessor.UpdateExistingEntityRelationship(XmlNode entityRelationshipNode, Guid entityRelationshipId, LocLabelHelper locLabelHelper, ExecutionContext context, MetadataHelper metadataHelper)
    	at ImportEntityRelationshipHandler.ImportItem()
    	at ImportHandler.Import()
    	at RootImportHandler.RunImport(String[] ImportEntities, String[] ImportRoles, String[] ImportWorkflows, ImportMask Mask)
    	at ImportXml.RunImport(String[] ImportEntities, String[] ImportRoles, String[] ImportWorkflows, ImportMask Mask)
    	at ImportXml.RunImport(String xml)
    	at ImportXmlService.ImportCompressedWithProgress(String parameterXml, Byte[] compressedCustomizationXml, Guid importJobId, ExecutionContext context)
    	at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    	at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    	at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    	at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    	at LogicalMethodInfo.Invoke(Object target, Object[] values)
    	at InternalOperationPlugin.Execute(IPluginExecutionContext context)
    	at PluginStep.Execute(PipelineExecutionContext context)
    	at Pipeline.Execute(PipelineExecutionContext context)
    	at MessageProcessor.Execute(PipelineExecutionContext context)
    	at InternalMessageDispatcher.Execute(PipelineExecutionContext context)
    	at ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    	at RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    	at RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    	at CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
    	at InProcessCrmService.Execute(Object request)
    	at PlatformCommand.ExecuteInternal()
    	at ImportCompressedXmlWithProgressCommand.Execute()
    	at DataSource.ImportCompressedXmlWithProgress(String entityList, Byte[] customizationXml, Guid importJobId)
    	at ImportCustomizationsGridPage.ImportEntities()
    	at ImportCustomizationsGridPage.ImportAction()
    	at xrm_tools_systemcustomization_importcustomizations_importcustomizationsgrid_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
    	at Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
    	at Control.RenderChildren(HtmlTextWriter writer)
    	at Page.Render(HtmlTextWriter writer)
    	at Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
    	at Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
    	at Control.RenderControl(HtmlTextWriter writer)
    	at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    	at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    	at Page.ProcessRequest()
    	at Page.ProcessRequestWithNoAssert(HttpContext context)
    	at Page.ProcessRequest(HttpContext context)
    	at xrm_tools_systemcustomization_importcustomizations_importcustomizationsgrid_aspx.ProcessRequest(HttpContext context)
    	at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    	at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    	at ApplicationStepManager.ResumeSteps(Exception error)
    	at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
    	at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
    	at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
    	at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    

     All suggestions/help is welcome ;)
    Thnx in advance.

    Sebastiaan

    Thursday, July 22, 2010 11:28 AM

Answers

  • If rollups installing/uninstalling does not helps, try exucute this sql on your <orgname>_mscrm database:

    UPDATE [dbo].[RelationshipView] SET [CascadeDelete] = 2 
    WHERE [IsCustomRelationship] = 0 AND [CascadeDelete] = 0
    
    Wednesday, December 1, 2010 7:26 PM
  • I noticed one other post with a similar error message and the issue in that environment is that the two systems Update Rollup did not match.  One system had UR 10 and the other had UR 11.  The individual who posted the issue fixed it by uninstalling UR 11 so that both systems had UR 10.  You could also consider updating both systems to UR 11 and try again.  Be sure to reboot both machines after the update.

    Regards, Donna

            Windows Live Blog

    Wednesday, July 28, 2010 12:46 AM
  • I came across the same issue and it was resolved by ensuring the roll-ups were the same on the servers. We had rollup 10 on one and rollup 17 on the other. Once we brought the rollup in sync the customisations imported OK.

    HTH

    Tuesday, September 27, 2011 1:52 PM
  • Thnx for all the replies!

    I think the UR11 install on one of the environments was not completed succesfully.
    The issue is resolved by installing UR12 on both environments and reboot the server.

    Now i'm able to import entities again :-)

    Thnx again for all your help!

    Sebastiaan

    Wednesday, August 4, 2010 6:53 AM

All replies

  • Have you tried changing the Cascade behaviour on delete for this relationship? 
    MSCRM Bing'd - http://bingsoft.wordpress.com
    Thursday, July 22, 2010 12:52 PM
    Moderator
  • Have you tried changing the Cascade behaviour on delete for this relationship? 
    MSCRM Bing'd - http://bingsoft.wordpress.com


    thnx for your reply! :)
    I cannot change the properties of the contact_activity_parties relationship because it's a system-behavior relationship.

    Thursday, July 22, 2010 2:52 PM
  • Hi Sebastiaan,

    I'll assume that the installation of the CRM system completed successfully (without errors) and everything is running as expected.  If that is not true, then I recommend a re-install or you can try a repair.

    If you have not already tried this, ensure you are importing all the entities that are related to the Contact.  Sometimes there are relationships with the Contact entity that need to be imported with it.  You can check the related entities by looking at teh 1:N, N:1 and N:N links on the Contact entity.  That means import all the activity types like: Phone Call, Task, E-mail, etc.  Include every related entity.

    Try importing all the related entities with the Contact and let me know how that goes.

     


    Regards, Donna

            Windows Live Blog

    Thursday, July 22, 2010 3:00 PM
  • Hey Donna,

    Thanx for the reply. The CRM server installation was succesful according to the system engineer who has installed MSCRM.
    Today i just tried your suggestion to import all the related entities but it did not help. I also tried to import the related entities first and after that the contact entity but didn't help either.

    Anyone has som other options i can try? Or should re-installing MSCRM be the only option? ;-)

    Kind Regards,

    Sebastiaan Klaver

    Friday, July 23, 2010 2:32 PM
  • Are you having this issue only with the Contact entity or with every entity that you try to import?  If you want to be sure that the installation completed successfully, you can check the following file:

    C:\Documents and Settings\Administrator or User Name that completed the installation\Application Data\Microsoft\MSCRM\Logs

    Open the log file named crm40svrsetup.log and scroll to the bottom.  You should see a message like Installation Successfully Completed toward the end of the log file.

    Can you provide some additional details about your environment.  Also, check the server application log and see if any other errors are listed.

     

     


    Regards, Donna

            Windows Live Blog

    Friday, July 23, 2010 5:00 PM
  • This issue occures at the Contact and the Account entity as far as i tested.

    I also checked the logfile to see if any errors occured but it looked OK even with the message Installation Succesfully Completed at the end.
    I compared the contact_activity_parties with other mscrm installations. On all environments (UR11 installed) the Delete option for relationship behavior is set to 'Cascade None' but on my client's enviornment the Delete option is set to 'Cascade all'.

    When i uninstalled UR11 the delete option was set back to 'Remove link'.
    Does anyone knows wich rollup changes this Cascading behavior on the contact_activity_parties relationship?

    MSCRM Professional edition is installed on the Windows server 2003 R2 SP2 server with MSSQL2005, and Exchange 2003 installed.
    MSCRM is running as the default website on the server.
    OK, installing mscrm on this server is not recommended but we had to.

    What specific details about the enviornment would you like to know? ;)

     

    Tuesday, July 27, 2010 2:29 PM
  • I noticed one other post with a similar error message and the issue in that environment is that the two systems Update Rollup did not match.  One system had UR 10 and the other had UR 11.  The individual who posted the issue fixed it by uninstalling UR 11 so that both systems had UR 10.  You could also consider updating both systems to UR 11 and try again.  Be sure to reboot both machines after the update.

    Regards, Donna

            Windows Live Blog

    Wednesday, July 28, 2010 12:46 AM
  • I think you are correct. Because I am also having same issue when I import contact entity into my development environment from production, where production is having latest update. This happens just because of environment with latest RU is having cascade none on delete for contact_activity_parties relationship and environment with old UR does not allow cascade none for the delete.


    IT
    Thursday, July 29, 2010 7:36 PM
  • The issue can occur for a few different reasons.

    1. If the relationship in question truly has Cascade None for delete. This is often not the case as the relationship is system and cannot be updated! The issue is likely occurring because of what the next two reasons.

    2. You have another CRM component without the same level of Update Rollup and the CRM website w3wp process is picking up the older DLL. Actually what occurs is some DLLs are newer and some are older and the mismatch causes the issue.

    3. The CRM Update Rollup is not correctly updating the DLLs used by the CRM website. Actually what occurs is some DLLs are newer and some are older and the mismatch causes the issue.

     

    Troubleshooting recommendations:

    I would check IIS manager for the true website file location and confirmed that the DLLs in the bin directory are at the appropriate file version for your Update Rollup. One other way to confirm the DLLs that are loaded by the CRM website w3wp.exe process is to use Process Explorer.

    Steps to get the actual DLLs loaded for the w3wp.exe process, including version information.

    1. Download Process Explorer from the link below.
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

    2.
    Extract ProcessExplorer.zip and run procexp.exe.

    3.
    In Process Explorer click View, Lower Pane View and click DLLs.

    4.
    In the list of processes click on w3wp.exe (there can be multiple if you have multiple websites on the machine).

    5.
    In the lower pane and click the Version column to sort the DLLs by version.

    6.
    Most CRM DLLs should have to version equivalent to the CRM service pack. e.g 4.0.7333.2862 for UR11.

     

    Darrin

    Monday, August 2, 2010 10:17 PM
  • Thnx for all the replies!

    I think the UR11 install on one of the environments was not completed succesfully.
    The issue is resolved by installing UR12 on both environments and reboot the server.

    Now i'm able to import entities again :-)

    Thnx again for all your help!

    Sebastiaan

    Wednesday, August 4, 2010 6:53 AM
  • Hi Sebastiaan,

    I experienced the same issue re-importing Case entity customizations; my system was up-to-date and all the dlls were aligned to 4.0.7333.2935 version (RP12). 

    As you can see later in my post, I solved commenting the node in the customizations.xml file that's reffered to the relationship. I think that's possibly because of incident_activity_parties is a system relationship, and so, acting this way, the import process doesn't remove it nor change it.

    <!--     <EntityRelationship Name="incident_activity_parties">
          <EntityRelationshipType>OneToMany</EntityRelationshipType>
          <ReferencingEntityName>ActivityParty</ReferencingEntityName>
          <ReferencedEntityName>Incident</ReferencedEntityName>
          <ReferencingAttributeName>partyid</ReferencingAttributeName>
          <RelationshipDescription>
            <Descriptions>
              <Description description="Identificatore univoco del partecipante associato all'impegno." languagecode="1040" />
            </Descriptions>
          </RelationshipDescription>
          <field name="partyid" requiredlevel="none" imemode="auto" lookupclass="alllookups" lookupstyle="single" lookupbrowse="0">
            <displaynames>
              <displayname description="Partecipante" languagecode="1040" />
            </displaynames>
          </field>
        </EntityRelationship> -->

     

    I hope this could help someone with the same problem,

    Best regards.

    Tuesday, August 31, 2010 1:15 PM
  • Hello,

    Make sure that You have installed same rollup for:

    • crm server
    • data migration manager

    Regards, NenoV

    Wednesday, September 15, 2010 7:05 AM
  • If rollups installing/uninstalling does not helps, try exucute this sql on your <orgname>_mscrm database:

    UPDATE [dbo].[RelationshipView] SET [CascadeDelete] = 2 
    WHERE [IsCustomRelationship] = 0 AND [CascadeDelete] = 0
    
    Wednesday, December 1, 2010 7:26 PM
  • Thanks Muzyukov

     

    This was the update query I was looking for.

    I had only 10 relationships where the cascadedelete was set to 0.

    Updating these fixed the problem.

     

    Good call.

     

    Ivo Bouwman

     


    Ivo
    Wednesday, February 16, 2011 10:44 AM
  • Thanks Muzyukov Evgeny,

    Your solution helped me to resolve the issue.

    :)

     

     

    Monday, September 19, 2011 3:35 PM
  • I came across the same issue and it was resolved by ensuring the roll-ups were the same on the servers. We had rollup 10 on one and rollup 17 on the other. Once we brought the rollup in sync the customisations imported OK.

    HTH

    Tuesday, September 27, 2011 1:52 PM
  • Hello,

    Make sure that You have installed same rollup for:

    • crm server
    • data migration manager

    Regards, NenoV

    Upgrading the Data Migration Manager to the same version solved the issue for me.  To get to Rollup 11, I needed to install Rollup 7 first..then apply Rollup 11.

    Sunday, February 12, 2012 8:16 PM