how to register crm 4 workflow in crm 2011
-
Tuesday, 15 March, 2011 10:43 PM
Hi,
I have a custom crm 4 workflow activity that I want to register in CRM 2011. I am using Plugin registration tool, but I am getting this error pasted beneath.
Has anyone seen this error, please assist.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly does not contain the required types or assembly content cannot be updated.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2011-03-03T00:29:37.833084Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2011-03-03T00:29:37.833084Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
at PluginRegistrationTool.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly) in D:\Resources\CRM SDK\tools\pluginregistration\RegistrationHelper.cs:line 427
at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in D:\Resources\CRM SDK\tools\pluginregistration\PluginRegistrationForm.cs:line 371I also tried to register the crm 4 workflow activity in crm 2011 with CRM 4 Plugin registration tool and it gave me the following error.
Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.
Detail: <detail><error>
<code>0x8004418b</code>
<description>Plug-in assembly does not contain the required types or assembly content cannot be updated.</description>
<type>Platform</type>
</error></detail>
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at PluginRegistrationTool.CrmSdk.CrmService.Update(BusinessEntity entity)
at PluginRegistrationTool.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)
at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)thanks
S.KHan
All Replies
-
Wednesday, 16 March, 2011 6:50 AM
I guess, your assembly does not have public constructor with no parameters. If so, add a public constructor without any parameters in addition to the existing public constructor with parameters.
Hope this helps.
Linkedin : http://in.linkedin.com/in/rammscrm/ -
Thursday, 17 March, 2011 10:12 PM
Hi,
thanks for your reply,
I have tried putting in a constructor with 0 parameters but unfortunately no luck.
here is the error that I get.
ERROR from CRM 4 - Plugin Registration Tool
Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.
Detail: <detail><error>
<code>0x8004418b</code>
<description>Plug-in assembly does not contain the required types or assembly content cannot be updated.</description>
<type>Platform</type>
</error></detail>
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at PluginRegistrationTool.CrmSdk.CrmService.Update(BusinessEntity entity)
at PluginRegistrationTool.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)
at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)ERROR from CRM 5 - Plugin Registration Tool
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly does not contain the required types or assembly content cannot be updated.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2011-03-17T22:11:08.1588841Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2011-03-17T22:11:08.1588841Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
at PluginRegistrationTool.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly) in D:\Resources\CRM SDK\tools\pluginregistration\RegistrationHelper.cs:line 427
at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in D:\Resources\CRM SDK\tools\pluginregistration\PluginRegistrationForm.cs:line 371 -
Monday, 21 March, 2011 3:56 AM
I have resolved this issue.
I created a new crm 2011 workflow activity (as a wrapper workflow activity) which internally calls a class that references crm 4 assemblies. by doing this it easily gets registered on CRM 2011, and works like a charm.
let me know if someone needs details.
cheers
S.Khan
- Marked As Answer by Sanaullah Khan Monday, 21 March, 2011 3:56 AM
-
Thursday, 24 March, 2011 8:39 AM
Hello Sanaulah,
Can you make this code available?
Thanks and regards
-
Thursday, 24 March, 2011 11:41 PM
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Activities; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Workflow; using Microsoft.Crm.Sdk; namespace MyWorkflows { public class MyNewWorkflow : CodeActivity { protected override void Execute(CodeActivityContext executionContext) { //Activity code //Create the tracing service ITracingService tracingService = executionContext.GetExtension<ITracingService>(); //Create the context IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>(); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>(); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); try { // call your crm 4 code from here InvoiceDebt pInvoiceDebt = new InvoiceDebt(service); } catch (Exception ex) { Common.Logging.WriteError(ex); } } } }the code pasted above is the class to get the context and then pass the IOrganizationService object to the crm 4 code.
hope it helps.
cheers, S.Khan- Marked As Answer by Sanaullah Khan Thursday, 14 April, 2011 11:40 PM
-
Friday, 24 June, 2011 9:41 PM
I apologize if this seems novice but does this wrapper also support the older formats of Crmnnumber, CrmInput, etc.
I am trying to use the code from the Sonoma Partners book to calculate field on related entities. I use this all over another database and I find it frustrating that the code is so different this time around.
Thanks for any help offered
Mitch
-
Thursday, 10 May, 2012 12:26 AM
What type of object is expected in the InvoiceDebt constructor? Don't you have to relate it to an ActivityExecutionContext of CRM4?
Thanks.