Tuesday, 19 August 2014

import crmsolution failed after update to rollup 16

Import-CrmSolutionFile : Import Error. workflow:{000000000-xxxxx-xxxxx}:Workflow name This workflow cannot be created, updated or published because it was created
 outside the Microsoft Dynamics CRM Web application. Your organization does not allow this type of
workflow.

http://msdn.microsoft.com/en-us/library/8da8c71e-84af-441e-b99b-0b59399f10f6#enable_disable

when following above instructions I started getting the below error.

At C:\PS\CRMPS.SolutionSourceControl.psm1:478 char:26
+             import-crmsolutionfile <<<<  -connection $connection -inputfile $solutionfile -publis
hworkflows -OverwriteUnmanagedCustomizations
    + CategoryInfo          : NotSpecified: (:) [Import-CrmSolutionFile], Exception
    + FullyQualifiedErrorId : System.Exception,CRMPS.Snapin.ImportCrmSolutionFileCmdlet

CRMPS > Add-PSSnapin Microsoft.Crm.Powershell
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
At line:1 char:13
+ Add-PSSnapin <<<<  Microsoft.Crm.Powershell
    + CategoryInfo          : InvalidArgument: (Microsoft.Crm.Powershell:String) [Add-PSSnapin], P
   SArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand


Resolution:

Check if the deployment manager is installed on the same machine from where the PowerShell is running.

Run "Windows PowerShell Modules"

  1. Add-PSSnapin Microsoft.Crm.PowerShell
  2. $setting = get-crmsetting customcodesettings
    
  3. $setting.AllowDeclarativeWorkflows="True"
    
  4. set-crmsetting $setting
    
  5. get-crmsetting customcodesettings
    
    

No comments:

Post a Comment