0
我是coompletely新的CRM这个插件部分2011年Dynamics CRM中2011错误,而登记插件
我写了一个简单plugin.Generated一个xrm.cs文件 并试图注册该插件,但它提供了一些“超时异常” 后来我从我的解决方案中删除了Xrm.cs文件,然后该插件得到注册。 我不明白为什么会发生这种情况。
下面是我的简单插件代码,它没有被调用,也许是因为我删除了Xrm.cs文件。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Microsoft.Xrm.Sdk;
using System.Runtime.Serialization;
namespace NewPlugin
{
public class Plugin : IPlugin
{
/// <summary>
/// A plugin that creates a follow-up task activity when a new account is created.
/// </summary>
/// <remarks>Register this plug-in on the Create message, account entity,
/// and asynchronous mode.
/// </remarks>
public void Execute(IServiceProvider serviceProvider)
{
//Extract the tracing service for use in debugging sandboxed plug-ins.
ITracingService tracingService =
(ITracingService)serviceProvider.GetService(typeof(ITracingService));
account
// Obtain the execution context from the service provider.
IPluginExecutionContext context = (IPluginExecutionContext)
serviceProvider.GetService(typeof(IPluginExecutionContext));
// The InputParameters collection contains all the data passed in the message request.
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
{
// Obtain the target entity from the input parameters.
Entity entity = (Entity)context.InputParameters["Target"];
throw new InvalidPluginExecutionException("not Possible");
}
}
}
}
如有任何人都可以给我一个想法什么是错WID我Xrm.cs文件,这将是很大的帮助。
此异常我得到的onclick的创建上的帐户页面按钮
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred. Contact a system administrator or refer to the Microsoft Dynamics CRM SDK troubleshooting guide.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>An error occurred. Contact a system administrator or refer to the Microsoft Dynamics CRM SDK troubleshooting guide.</Message>
<Timestamp>2013-10-28T04:51:39.2540481Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
[ActivityFeeds.Plugins: ActivityFeeds.Plugins.ActivityClose]
[34685442-783d-e311-a318-b4b52f6727c4: ActivityFeeds.Plugins.ActivityClose: Create of account]
请在您的问题中插入异常详细信息。这可能会更容易帮助你 – lazarus
你的'Xrm.cs'文件中有什么? – glosrob