我有一个自定义的工作流程活动,可以注册。但是,当我将它添加到工作流程时,我得到“找不到请求的记录,或者您没有足够的权限来查看它”错误。我是管理员,它使用相同的用户帐户注册。跟踪文件中没有信息。可能导致这种情况的原因是什么?
更新:请注意,这不是在运行时,而是在设计时发生。即我实际上无法将此活动添加到工作流程中。当我尝试时,我得到上述错误。
更新2:我将我的代码简化为此并仍然得到相同的消息:
using System;
using System.Workflow.ComponentModel;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.Workflow;
using MicroFour.StrataFrame.Data;
namespace Fox.Crm.CustomWorkflowActivities
{
[CrmWorkflowActivity( "Get Entity Link", "Fox Tools" )]
public class GetEntityLinkActivity
: Activity
{
public static readonly DependencyProperty FullNameProperty = DependencyProperty.Register( "FullName"
, typeof( string )
, typeof( GetEntityLinkActivity ) );
[CrmInput( "FullName" )]
public string FullName
{
get { return (string)GetValue( FullNameProperty ); }
set { SetValue( FullNameProperty, value ); }
}
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register( "Message"
, typeof( string )
, typeof( GetEntityLinkActivity ) );
[CrmOutput( "Message" )]
public string Message
{
get { return (string)GetValue( MessageProperty ); }
set { SetValue( MessageProperty, value ); }
}
protected override ActivityExecutionStatus Execute( ActivityExecutionContext executionContext )
{
this.Message = string.Format( "Hellow {0}", this.FullName );
//-- Return that we successfully determined URL and link.
return ActivityExecutionStatus.Closed;
}
}
}