Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics 365 v9 OnPremise Upgrade Fail

(0) ShareShare
ReportReport
Posted on by

Hello,

We've upgraded a copy of our production CRM in a sandbox test environment. Towards the end of the upgrade, the following error message appears and the install fails 

21:12:01|   Info| Installing msdynce_MarketingSales from C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingSales_managed_Package.zip.
21:12:01|   Info| Attempting to acquire lock to unzip package file C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingSales_managed_Package.zip to location C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0002_3034\msdynce_MarketingSales.
21:12:01|   Info| Acquired llock to unzip package file C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingSales_managed_Package.zip to location C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0002_3034\msdynce_MarketingSales. Took 0 seconds.
21:12:01|   Info| Unzipping package file C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingSales_managed_Package.zip to location C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0002_3034\msdynce_MarketingSales.
21:12:01|   Info| Unzipped package file C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingSales_managed_Package.zip to location C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0002_3034\msdynce_MarketingSales. Took 0 seconds.
21:12:01|   Info| Released lock for package file C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingSales_managed_Package.zip unzipped to location C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0002_3034\msdynce_MarketingSales.
21:12:01|   Info| Found msdynce_MarketingSales in cache C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0002_3034\msdynce_MarketingSales.
21:12:01|   Info| PackageDeployer: Starting msdynce_MarketingSales install.
21:13:36|   Info| Failed to install package msdynce_MarketingSales on attempt 1.
21:13:36|   Info| Failed to install msdynce_MarketingSalesException: Microsoft.Crm.PackageDeployment.PackageDeployerException: Package msdynce_MarketingSales failed to install on attempt 1.
System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerImportException: PackageDeployerWrapper: Import Failed status encountered. Details: Failed to load solution Marketing Sales Patch, version: 9.0.4.3602. See the log file.
   at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerImportException: PackageDeployerWrapper: Import Failed status encountered. Details: Failed to load solution Marketing Sales Patch, version: 9.0.4.3602. See the log file.
   at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
   at System.Threading.Tasks.Task.Execute()<---

[04/11/2018 05:12:01 PM]: PackageDeployerWrapper: Resetting PackageDeployer operation completion state.
[04/11/2018 05:12:01 PM]: PackageDeployerWrapper: Starting PackageDeployer configuration parsing.
[04/11/2018 05:12:01 PM]: Reading the import configuration. Please wait.
[04/11/2018 05:12:01 PM]: Reading the solutions. Please wait.
[04/11/2018 05:12:03 PM]: Found the solution: Marketing Sales, version: 9.0.4.29 (Managed)
[04/11/2018 05:12:03 PM]: Found the solution: Marketing Sales Patch, version: 9.0.4.3602 (Managed)
[04/11/2018 05:12:03 PM]: Found the detailed data to import.
[04/11/2018 05:12:03 PM]: PackageDeployerWrapper: PackageDeployer successfully finished configuration parsing.
[04/11/2018 05:12:03 PM]: PackageDeployerWrapper: Starting PackageDeployer import operation.
[04/11/2018 05:12:03 PM]: PackageDeployerWrapper: Waiting for PackageDeployer completion...
[04/11/2018 05:13:27 PM]: PackageDeployerWrapper: PackageDeployer reported status [Failed] during import: Failed to load solution Marketing Sales Patch, version: 9.0.4.3602. See the log file.
[04/11/2018 05:13:27 PM]: PackageDeployerWrapper: Logger LastError: Message: Importing solution threw and unforeseen exception
Source	: Microsoft.Crm.Extensibility
Method	: Execute
Date	: 09:13:27 PM
Time	: 04/11/2018
Error	: The AttributeLookupValue (Id=81cde1dc-2241-db11-898a-0007e9e17ebd) entity or component has attempted to transition from an invalid state: ComponentStateName: Solution; ComponentOperation: Delete; ComponentSolutionType: Active; SolutionOperationContext: MoveSystemComponentToFirstPartySolution; IsProtected: False; FinalComponentState: Publish.
Stack Trace	: at Microsoft.Xrm.Tooling.PackageDeployment.CrmPackageCore.ImportCode.BaseImportCustomizations.ExecuteImportSolution(ConfigSolutionFile Sol, String sSolutionImportFilePath)
======================================================================================================================

[04/11/2018 05:13:27 PM]: PackageDeployerWrapper: Logger LastException: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The AttributeLookupValue (Id=81cde1dc-2241-db11-898a-0007e9e17ebd) entity or component has attempted to transition from an invalid state: ComponentStateName: Solution; ComponentOperation: Delete; ComponentSolutionType: Active; SolutionOperationContext: MoveSystemComponentToFirstPartySolution; IsProtected: False; FinalComponentState: Publish. (Fault Detail is equal to Exception details: 
ErrorCode: 0x8004F00E
Message: The AttributeLookupValue (Id=81cde1dc-2241-db11-898a-0007e9e17ebd) entity or component has attempted to transition from an invalid state: ComponentStateName: Solution; ComponentOperation: Delete; ComponentSolutionType: Active; SolutionOperationContext: MoveSystemComponentToFirstPartySolution; IsProtected: False; FinalComponentState: Publish.; 
[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[1b830950-e106-4ee1-b3fd-d348cb65dc8d: ObjectModel Implementation]


I have not yet checked what this Attribute Lookup Value refers to, but wanted to see if others had come across the same issue.

*This post is locked for comments

  • Ahmed Akl Profile Picture
    20 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Hi Dmitriy ,

    Are you got any solution to fix this issue am trying to upgrade CRM from v 8.2.3 to v 9.0.3.7 and I have the same error.

    Package msdynce_LeadManagement failed to install on attempt 1

    Error Snap :

    20:57:12|  Error| Import Organization failed with Exception:

    Microsoft.Crm.CrmException: Upgrade Organization with Id=""failed with Exception:

    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallCrmSystemConvertedSolutionsAction ---> Microsoft.Crm.PackageDeployment.PackageDeployerException: Package msdynce_LeadManagement failed to install on attempt 1.

    System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: PackageDeployerWrapper: Import operation timed out.

      at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)

      at System.Threading.Tasks.Task.Execute()

      --- End of inner exception stack trace ---

    ---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: PackageDeployerWrapper: Import operation timed out.

      at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)

      at System.Threading.Tasks.Task.Execute()<---

    Thanks.

  • Thomas Bergmair Profile Picture
    35 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Great job!

    i had an additional problem.

    the error was "Cannot change base solution for patch."

    in solutionbase table i have seen that "patch" Solution have not had a Parentsolutionid.

    this was my TSQL Statement to fix it.

    UPDATE       SolutionBase

    SET                ParentSolutionId = parent.SolutionId

    FROM            SolutionBase INNER JOIN

                                (SELECT        SolutionId, UniqueName

                                  FROM            SolutionBase AS SolutionBase_1) AS parent ON parent.UniqueName = REPLACE(SolutionBase.UniqueName, 'patch', '')

    WHERE        (SolutionBase.UniqueName LIKE '%patch') AND (SolutionBase.ParentSolutionId IS NULL)

  • JVE Profile Picture
    213 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    I thought I'll do follow up on how I solved this issue of "The leadtoopportunitysalesprocess entity cannot be customized for offline.".

    Updating to "Version 1612 (9.0.15.9)" for me and not having msdynce_SalesPatch solution updated was getting me into the trouble. All over the place many Create actions couldn't be completed as these exceptions were thrown all over the place:

    Assembly content(Microsoft.Dynamics.Sales.Plugins, Version=9.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) does not match the expected assembly identity (Microsoft.Dynamics.Sales.Plugins, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
    So basically that assembly wasn't updated and it is contained in msdynce_SalesPatch.

    The solution
    leadtoopportunitysalesprocess entity metadata property IsOfflineInMobileClient had to be TRUE, but was FALSE in my env. With plain PowerShell it could be done:
    # Install-Module -Name Microsoft.Xrm.Tooling.CrmConnector.PowerShell # Install if you haven't 
    Import-Module Microsoft.Xrm.Tooling.CrmConnector.PowerShell
    $cred = Get-Credential
    $crm = Get-CrmConnection -OrganizationName ORG -ServerUrl "https://crm.example.com" -Credential $cred
    $retrieveRequest = New-Object Microsoft.Xrm.Sdk.Messages.RetrieveEntityRequest
    $retrieveRequest.LogicalName = "leadtoopportunitysalesprocess"
    $retrieveRequest.EntityFilters = [Microsoft.Xrm.Sdk.Metadata.EntityFilters]::Entity
    $entityResponse = $crm.Execute($retrieveRequest)
    $entityResponse.Results["EntityMetadata"].IsOfflineInMobileClient.Value = $true
    $updateRequest = new-object Microsoft.Xrm.Sdk.Messages.UpdateEntityRequest
    $updateRequest.Entity = $entityResponse.Results["EntityMetadata"]
    $updateResponse = $crm.Execute($updateRequest)


    After this, I could successfully execute execute mentioned Import-CrmPackage command... for one environment. 

    Solution for other environment
    As for other CRM environment this was not enough. The value changed (if I retrieved IsOfflineInMobileClient via PowerShell it said TRUE afterwards), but it was still failing (even after reboot).
    So I did have to do some surgery on CRM database which, of course, is unsupported!
    UPDATE MetadataSchema.Entity
    SET IsOfflineInMobileClient = 1
    WHERE LogicalName = 'opportunitysalesprocess' AND IsOfflineInMobileClient = 0


    And that was it - now I could update that solution package in the other environment too.


    Things I've tried and more details:

    I looked up the place in CRM source code where error is being thrown. It's within Microsoft.Crm.MetadataService.dll particular function:

    private void ValidateMobileOfflineFlagsForBPFEntity(EntityUpdateInfo entityInfo, MetadataBusinessEntity oldEntityData, ExecutionContext context)
    		{
    			if (entityInfo.EntityDescription.InnerEntityData.IsPropertyNullOrNameInvalid("isbpfentity") ? ((bool)oldEntityData["isbpfentity"]) : entityInfo.IsBPFEntity)
    			{
    				if (!entityInfo.EntityDescription.InnerEntityData.IsPropertyNullOrNameInvalid("isofflineinmobileclient") && !entityInfo.IsOfflineInMobileClient)
    				{
    					throw new CrmException(string.Format(CultureInfo.InvariantCulture, "The {0} entity cannot be customized for offline.", new object[1]
    					{
    						(string)oldEntityData.MetadataAttributes["logicalname"].Value
    					}), -2147220989);
    				}
    				if (!entityInfo.EntityDescription.InnerEntityData.IsPropertyNullOrNameInvalid("mobileofflinefilters") && !string.IsNullOrWhiteSpace(entityInfo.MobileOfflineFilters))
    				{
    					throw new CrmException(string.Format(CultureInfo.InvariantCulture, "The {0} entity cannot be customized for offline.", new object[1]
    					{
    						(string)oldEntityData.MetadataAttributes["logicalname"].Value
    					}), -2147220989);
    				}
    			}
    		}


    That actually led me to understanding that I have to try to set IsOfflineInMobileClient.

    The MetadataSchema.Entity table contains 2 rows for opportunitysalesprocess. One had IsOfflineInMobileClient = 1, the other was 0 which had to be updated. I have 2 rows in both environments - i don't know why. Maybe because on row references managed solution and the other references default solution in org? Don't know, just speculation, but in first env, this database value was updated after I executed powershell command. As for second environment, probably metadata service was operating with the row which had value set to 1, but update process was probably querying value for the other row.

    By the way, once IsOfflineInMobileClient is set to 1, it cannot be changed back via web service to 0 (FALSE). It gives the same error as within update: "The leadtoopportunitysalesprocess entity cannot be customized for offline.".

    Anyways, before going down DB update route I did try these other things.

    Tried to reimport entity from fresh organization
    I've created fresh organization and identified that IsOfflineInMobileClient by default is set to 1 for that process. As our DB is living through many CRM updates, probably somewhere Dynamics CRM didn't set correct value there. I've tried to put that entity into a solution and import into our org, but that didn't help.

    Modify msdynce_SalesPatch_managed solution.
    The other thought was that I could modify the msdynce_SalesPatch_managed components and remove customizations to opportunitysalesprocess. So what I see is that when CRM goes thought Database update process, it puts solutions here: "C:\Program Files\Dynamics 365\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0015_0009"

    So I grabbed msdynce_Sales\msdynce_Sales\msdynce_SalesPatch_managed.cab, unpacked to get hold of solution .zip file. It can be unpacked into a more user-friendlier way using MS SolutionPackager available as a CRM tool.
    Set-Alias SolutionPackager "E:\SDK\Dynamics 365\Tools\CoreTools\SolutionPackager.exe"
    SolutionPackager /action:extract /zipfile:C:\crm\msdynce_SalesPatch_managed.zip /folder:C:\crm\msdynce_SalesPatch_managed

    Then I inspected Entities\LeadToOpportunitySalesProcess folder and saw that only some views were being customized. As of entity, not much was there. No customizations:
    
      LeadToOpportunitySalesProcess
      
        
          
        
      
      
      
    


    I looked up what does it look like in my org and it had listed modifications to 2 attributes: LeadId, OpportunityId and then some metadata properties. So reimporting from fresh organization didn't re-set entity to unmodified="1"

    Anyways, I'v deleted folder Entities\LeadToOpportunitySalesProcess and in Other/Solution.xml i'v removed "<RootComponent type="1" schemaName="LeadToOpportunitySalesProcess" behavior="1" />" and repackaged solution 

    SolutionPackager /action:Pack /zipfile:"C:\CRM\msdynce_SalesPatch_managed.zip" /folder:"C:\CRM\msdynce_SalesPatch_managed"

    Put it back into .cab file and copied msdynce_Sales folder to some safe place where I overwrited msdynce_SalesPatch_managed.cab with my changes. Tried to import with Import-CrmPackage and... don't have the error saved, but it complained that some signature was not matching. OK, so that leads me to think CRM has safeguarded managed solutions to prevent someone fiddling like that. This was a dead end using this method.

  • Dmitriy Gr Profile Picture
    15 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    i have similar problem during update, but with another package.

    can somebody explain me, what should i do?

    12:46:06| Info| Failed to install package msdynce_LeadManagement on attempt 1.

    12:46:06| Info| Failed to install msdynce_LeadManagementException: Microsoft.Crm.PackageDeployment.PackageDeployerException: Package msdynce_LeadManagement failed to install on attempt 1.

    System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerImportException: PackageDeployerWrapper: Import Failed status encountered. Details: Failed to load solution Lead Management, version: 9.0.4.0066. See the log file.

    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)

    at System.Threading.Tasks.Task.Execute()

    --- End of inner exception stack trace ---

    ---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerImportException: PackageDeployerWrapper: Import Failed status encountered. Details: Failed to load solution Lead Management, version: 9.0.4.0066. See the log file.

    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)

    at System.Threading.Tasks.Task.Execute()<---

    [4/2/2020 9:45:16 AM]: PackageDeployerWrapper: Resetting PackageDeployer operation completion state.

    [4/2/2020 9:45:16 AM]: PackageDeployerWrapper: Starting PackageDeployer configuration parsing.

    [4/2/2020 9:45:16 AM]: Reading the import configuration. Please wait.

    [4/2/2020 9:45:16 AM]: Reading the solutions. Please wait.

    [4/2/2020 9:45:19 AM]: Found the solution: Lead Management, version: 9.0.4.0066 (Managed)

    [4/2/2020 9:45:19 AM]: Found the solution: Lead Management Patch, version: 9.0.4.0566 (Managed)

    [4/2/2020 9:45:19 AM]: PackageDeployerWrapper: PackageDeployer successfully finished configuration parsing.

    [4/2/2020 9:45:19 AM]: PackageDeployerWrapper: Starting PackageDeployer import operation.

    [4/2/2020 9:45:19 AM]: PackageDeployerWrapper: Waiting for PackageDeployer completion...

    [4/2/2020 9:45:51 AM]: PackageDeployerWrapper: PackageDeployer reported status [Failed] during import: Failed to load solution Lead Management, version: 9.0.4.0066. See the log file.

    [4/2/2020 9:45:51 AM]: PackageDeployerWrapper: Logger LastError: Message: Importing solution threw and unforeseen exception

    Source : Microsoft.Crm.Extensibility

    Method : Execute

    Date : 12:45:51 PM

    Time : 4/2/2020

    Error : Import failed

    Stack Trace : at Microsoft.Xrm.Tooling.PackageDeployment.CrmPackageCore.ImportCode.BaseImportCustomizations.ExecuteImportSolution(ConfigSolutionFile Sol, String sSolutionImportFilePath)

    ======================================================================================================================

    [4/2/2020 9:45:51 AM]: PackageDeployerWrapper: Logger LastException: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Import failed (Fault Detail is equal to Exception details:

    ErrorCode: 0x8004801E

    Message: Import failed;

    [Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]

    [1b830950-e106-4ee1-b3fd-d348cb65dc8d: ObjectModel Implementation]

    TimeStamp: 2020-04-02T09:45:51.5944390Z

    --

    Exception details:

    ErrorCode: 0x8004801E

    Message: Import failed

    TimeStamp: 2020-04-02T09:45:51.5944390Z

    --

    Exception details:

    ErrorCode: 0x80040216

    Message: System.ArgumentException: An item with the same key has already been added.

    TimeStamp: 2020-04-02T09:45:51.5944390Z

    --

    ).

    [4/2/2020 9:45:51 AM]: PackageDeployerWrapper: PackageDeployerWrapper: OrganizationServiceFault details: Exception details:

    ErrorCode: 0x8004801E

    Message: Import failed;

    [Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]

    [1b830950-e106-4ee1-b3fd-d348cb65dc8d: ObjectModel Implementation]

    TimeStamp: 2020-04-02T09:45:51.5944390Z

    --

    Exception details:

    ErrorCode: 0x8004801E

    Message: Import failed

    TimeStamp: 2020-04-02T09:45:51.5944390Z

    --

    Exception details:

    ErrorCode: 0x80040216

    Message: System.ArgumentException: An item with the same key has already been added.

    TimeStamp: 2020-04-02T09:45:51.5944390Z

  • jdalske Profile Picture
    537 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Mine was uncommented and I still received the error. Any other thoughts?

  • JVE Profile Picture
    213 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Hi. After some issues from upgrading 8 to 9, i'v been successfully installing monthly patches until I hitting 9.0.9. Going to 9.0.{10,11,12,13} partially succeeds with error. This particular error for upgrading from .12 to .13. Because the update kind of succeeds - frontends are updated, database update throws error, but shows that version is updated. Error log contains:

    [Information][8] Executing OverrideSolutionImportDecision Custom code
    [Information][8] OverrideSolutionImportDecision msdynce_SalesPatch solution, Version: 9.0, deployed version: 9
    [Information][8] Processing Solution Sales Patch(msdynce_SalesPatch) - Inbound version: 9.0.4.1347 - Deployed Version 9.0.4.1306, System Determined Import Action: Import ||-> Package Overrode Decision, Requesting Import Action: UserRequestedUpdateSameVersion
    [Information][8] ImportSolution - User Requested Update solution Sales Patch version 9.0.4.1347 with version 9.0.4.1306
    [Stop][512] ImportSolution
    [Stop][512] IsSolutionalreadyDeployed
    [Start][256] ImportSolution
    [Information][8] Importing solution for Sales Patch Version: 9.0.4.1347
    [Start][256] RaiseUpdateEvent
    [Stop][512] RaiseUpdateEvent
    [Information][8] Executing PreSolutionImport Custom code
    [Verbose][16] Executed Command - RetrieveMultiple : GetEntityDataBySearchParms : RequestID=0574039a-2b88-4d87-a815-333c8d487851 : duration: 00:00:00
    [Verbose][16] Executed Command - RetrieveMultiple : GetEntityDataBySearchParms : RequestID=5787466c-f437-4115-8b79-41e8ca2692d7 : duration: 00:00:00
    [Verbose][16] Executed Command - msdyn_ResetPrimaryNameFieldForOQOIDetailEntities : Execute (msdyn_ResetPrimaryNameFieldForOQOIDetailEntities) request to CRM from IOrganizationService : RequestID=a705fdb6-e7f1-455b-bfc5-bf2ac4f7bd67 : duration: 00:00:00.6301329
    [Verbose][16] Executed Command - msdyn_UpdateIsCustomFieldForOQOIDetailEntities : Execute (msdyn_UpdateIsCustomFieldForOQOIDetailEntities) request to CRM from IOrganizationService : RequestID=5c554b5e-0ccd-4723-bcc0-26b9992d772a : duration: 00:00:00.0624938
    [Information][8] Invoking stored procedure p_UpdateMobileClientVisibilitySettingsForSalesLiteratureEntity
    [Verbose][16] Executed Command - msdyn_UpdateIsValidForAdvancedFindForProductPriceLevel : Execute (msdyn_UpdateIsValidForAdvancedFindForProductPriceLevel) request to CRM from IOrganizationService : RequestID=b3c5c14e-a191-4ffa-9e6c-18ef81859436 : duration: 00:00:00.0312551
    [Information][8] Successfully invoked the Stored Procedure p_UpdateMobileClientVisibilitySettingsForSalesLiteratureEntity for msdynce_SalesPatch solution and returned: 2
    [Information][8] Invoking stored procedure p_UpdateIsValidForAdvancedFindForAdminSettingsEntity
    [Verbose][16] Executed Command - msdyn_InvokeSalesSolutionStoredProc : Execute (msdyn_InvokeSalesSolutionStoredProc) request to CRM from IOrganizationService : RequestID=3d1f7541-e1f9-473e-9d04-adcac944ef7e : duration: 00:00:00.0468754
    [Information][8] Successfully invoked the Stored Procedure p_UpdateIsValidForAdvancedFindForAdminSettingsEntity for msdynce_SalesPatch solution and returned: 0
    [Information][8] Executing Solution Import Pre v8.0
    [Verbose][16] Executed Command - msdyn_InvokeSalesSolutionStoredProc : Execute (msdyn_InvokeSalesSolutionStoredProc) request to CRM from IOrganizationService : RequestID=01b68837-09ad-4ce1-8024-42dfb04da41b : duration: 00:00:00.0156252
    [Information][8] Created new importjob id 900f5370-5446-4c7a-81ac-49c6ddf57086
    [Verbose][16] Failed to Execute Command - ImportSolution : RequestID=a2867686-04f6-4261-a0ef-711cf471ce62
    [Error][2] Source	: Microsoft.Crm.Extensibility
    Method	: Execute
    Date	: 2/17/2020
    Time	: 9:25:01 AM
    Error	: Message: The leadtoopportunitysalesprocess entity cannot be customized for offline.
    ErrorCode: -2147220989
    Trace: 
    [Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
    [1b830950-e106-4ee1-b3fd-d348cb65dc8d: ObjectModel Implementation]
    
    
    Stack Trace	: at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
       at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
       at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.CrmCommand_Execute(OrganizationRequest req, String errorStringCheck)
    ======================================================================================================================
    Inner Exception Level 1	: 
    ==OrganizationServiceFault Info=======================================================================================
    Error	: The leadtoopportunitysalesprocess entity cannot be customized for offline.
    Time	: 2/17/2020 7:25:01 AM
    ErrorCode	: -2147220989
    Date	: 2/17/2020
    Time	: 9:25:01 AM
    Trace	: Not Provided
    ======================================================================================================================
    
    [Error][2] Message: Importing solution threw and unforeseen exception
    Source	: Microsoft.Crm.Extensibility
    Method	: Execute
    Date	: 9:25:01 AM
    Time	: 2/17/2020
    Error	: The leadtoopportunitysalesprocess entity cannot be customized for offline.
    Stack Trace	: at Microsoft.Xrm.Tooling.PackageDeployment.CrmPackageCore.ImportCode.BaseImportCustomizations.ExecuteImportSolution(ConfigSolutionFile Sol, String sSolutionImportFilePath)
    ======================================================================================================================
    
    [Start][256] RaiseFailEvent
    [Stop][512] RaiseFailEvent
    [Stop][512] ImportSolution
    [Stop][512] DoImportSolutionItem
    
       at Microsoft.Crm.Tools.Admin.InstallDynamicsSolutionsAction.DoOneInternal(SolutionInfo solutionInfo, String fileFullPathAndName, OrganizationInfo organizationInfo)
       at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
       at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
       at Microsoft.Crm.Tools.Admin.InstallDynamicsSolutionsAction.<>c__DisplayClass30_0.b__0()
    09:25:05|   Info| Installing msdynce_MarketingService from C:\Program Files\Dynamics 365\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\msdynce_MarketingService_managed_Package.zip.
    09:25:05|   Info| Found msdynce_MarketingService in cache C:\Program Files\Dynamics 365\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0013_0011\msdynce_MarketingService.
    09:25:05|   Info| PackageDeployer: Starting msdynce_MarketingService install.
    09:25:10|   Info| Package msdynce_MarketingService was installed successfully on attempt 1.
    09:25:10|   Info| PackageDeployer Logs for attempt 1: [2/17/2020 7:25:05 AM]: PackageDeployerWrapper: Resetting PackageDeployer operation completion state.

    The error is: The leadtoopportunitysalesprocess entity cannot be customized for offline.

    I did have that business process flow disabled, so I enabled, retried on non-upgraded ORG and still eror.

    In the end,  editing "C:\Program Files\Dynamics 365\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0013_0011\msdynce_Sales\msdynce_Sales\ImportConfig.xml" by commenting out  <!--<configsolutionfile solutionpackagefilename="msdynce_SalesPatch_managed.cab" publishworkflowsandactivateplugins="true" />--> it did succeed, but obviously didn't deploy this sales solution patch.

    Warning. That may bring consequences further down the road. If you have CRM support, better contact that one.

    By the way, the package can be retried for import (but it won't work anyway). it is just that I validated that 9_0_0009_0004 imports successfully, but 9_0_0010_0011 does not. Code to try to import package:

    Install-Module -Name Microsoft.Xrm.Tooling.PackageDeployment.Powershell
    Install-Module -Name Microsoft.Xrm.Tooling.CrmConnector.PowerShell
    Import-Module Microsoft.Xrm.Tooling.PackageDeployment.Powershell
    Import-Module Microsoft.Xrm.Tooling.CrmConnector.PowerShell
    $cred = Get-Credential
    $crm = Get-CrmConnection -OrganizationName ORG -ServerUrl "https://crm.example.com" -Credential $cred
    Import-CrmPackage -CrmConnection $crm -PackageDirectory "C:\Program Files\Dynamics 365\Setup\Serviceability\Latest\Actions_Org\Install\Packages\CRMApps\PkgCache_9_0_0013_0011\msdynce_Sales" -PackageName "SalesPVS.dll" -UnpackFilesDirectory C:\packageimport -LogWriteDirectory C:\packageimport\log -Verbose

  • Nathan Ellefsen Profile Picture
    45 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Just an Fyi. Don't go to the latest 9.0 patch because the upgrade issue will come back. I was able to upgrade a v8 org with 9.0.8, but went to 9.0.11 or 9.0.12, I don't remember which, and it didn't work. So I had to go back to 9.0.8.

  • Community Member Profile Picture
    on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Thanks, I try with 9.0.3 and it works.

  • Suggested answer
    indlad Profile Picture
    450 on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Hi Sebastien,

         You need to install 9.0.4 atleast and reimport the Org. If you have tried the Import and the import failed, the database changes not rolled back. So you need to get the fresh copy of the 8.2 database and install on 9.0.4 atleast, but the latest version is 9.0.12 - support.microsoft.com/.../microsoft-dynamics-365-onpremise-cumulative-updates

  • Community Member Profile Picture
    on at
    RE: Dynamics 365 v9 OnPremise Upgrade Fail

    Hello all,

    I have the same issue than you, when trying to upgrade from 8.2.5.4 to 9.0.2.3034 : Failed to install msdynce_MarketingSalesException

    The AttributeLookupValue (Id=81cde1dc-2241-db11-898a-0007e9e17ebd) entity or component has attempted to transition from an invalid state: ComponentStateName: SolutionActive; ComponentOperation: Delete; ComponentSolutionType: Active; SolutionOperationContext: MoveSystemComponentToFirstPartySolution; IsProtected: False; FinalComponentState: Publish.

    Do you find a solution ?

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans