积极答复者
新建实体 出了一个莫名其妙的错误:无效的参数

问题
答案
-
终于把问题解决了,最后确定了问题原因:前段时间由于手贱,把‘系统定制员'[英文名:System Cusomizer role],这个角色给删除了。
而系统中如果没有这个角色就不能进行客户化。悲催啊,没文化,真可怕。
最后解决方案:
1、自己手动创建一个’系统定制员‘角色,权限你得根据另外一个正常的CRM该角色权限来设置,或者还原一下旧版本,看下这个角色有哪些权限。
2、到数据库’RoleTemplateId'表中,取出‘系统定制员’的GUID。
3、打开‘RoleBase’表,查找所有‘Name’字段值为‘系统定制员’的记录,并把上一步中的GUID,粘贴至本表的‘RoleTemplateId’字段中。
这里其实可以用SQL语句批量完成,不过如果想熟悉下CRM表结构,还是手动一个个输吧,当然千万别输错了,引入其他错误。4、运行sql语句“select roletemplateid,[name] from rolebase where [name]='系统定制员'”,看看是否有遗漏的
5、保存SQL操作,重启CRM,现在应该没问题了,(当然我是可以创建实体了,如果您还不行,估计还有其它问题。)
谢谢,以前这个问题的解决者。
参考:http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/9691b709-bb38-4056-a40e-9e0b58df9e3c/
全部回复
-
跟踪到一些错误了:
at EntityService.Create(EntityCreateInfo entityInfo, ExecutionContext context)
at EntityService.Create(EntityCreateInfo entityInfo)
at EntityCreate.Execute(IUser user, ParameterBag paramBag)
at SystemCustomization.CreateEntity(XmlNode data)
at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at LogicalMethodInfo.Invoke(Object target, Object[] values)
at WebServiceHandler.Invoke()
at WebServiceHandler.CoreProcessRequest()
at SyncSessionlessHandler.ProcessRequest(HttpContext context)
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at HttpApplication.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
>EntityService.Create caught exception: Microsoft.Crm.CrmArgumentException: roleId ---> System.ArgumentException: roleId
--- 内部异常堆栈跟踪的结尾 ---
在 Microsoft.Crm.Exceptions.ThrowIfGuidEmpty(Guid parameter, String name)
在 Microsoft.Crm.ObjectModel.RoleServiceInternal`1.AddPrivileges(Guid roleId, RolePrivilege[] privileges, ExecutionContext context)
在 Microsoft.Crm.Metadata.SecurityHelper.AddPrivilegesToUserRole(RolePrivilege[] privileges, Guid[] roleTemplates, ExecutionContext context)
在 Microsoft.Crm.Metadata.SecurityHelper.CreateEntityHelper(IEntityDescription entityDescription, OwnershipTypes ownershipTypeMask, ExecutionContext context)
在 Microsoft.Crm.Metadata.EntityService.CreateInternal(EntityCreateInfo entityInfo, ExecutionContext context)
在 Microsoft.Crm.Metadata.EntityService.Create(EntityCreateInfo entityInfo, ExecutionContext context) -
终于把问题解决了,最后确定了问题原因:前段时间由于手贱,把‘系统定制员'[英文名:System Cusomizer role],这个角色给删除了。
而系统中如果没有这个角色就不能进行客户化。悲催啊,没文化,真可怕。
最后解决方案:
1、自己手动创建一个’系统定制员‘角色,权限你得根据另外一个正常的CRM该角色权限来设置,或者还原一下旧版本,看下这个角色有哪些权限。
2、到数据库’RoleTemplateId'表中,取出‘系统定制员’的GUID。
3、打开‘RoleBase’表,查找所有‘Name’字段值为‘系统定制员’的记录,并把上一步中的GUID,粘贴至本表的‘RoleTemplateId’字段中。
这里其实可以用SQL语句批量完成,不过如果想熟悉下CRM表结构,还是手动一个个输吧,当然千万别输错了,引入其他错误。4、运行sql语句“select roletemplateid,[name] from rolebase where [name]='系统定制员'”,看看是否有遗漏的
5、保存SQL操作,重启CRM,现在应该没问题了,(当然我是可以创建实体了,如果您还不行,估计还有其它问题。)
谢谢,以前这个问题的解决者。
参考:http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/9691b709-bb38-4056-a40e-9e0b58df9e3c/