[Dynamic Crm] missing prvOverrideCreatedOnCreatedBy privilege
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Dynamic Crm] missing prvOverrideCreatedOnCreatedBy privilege相关的知识,希望对你有一定的参考价值。
<ErrorCode>-2147220960</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <Message>Principal user (Id=fc3a7e74-b2b9-e511-93f5-00155d04942f, type=8) is missing prvOverrideCreatedOnCreatedBy privilege (Id=d48cf22f-f8c2-4e16-89eb-49f8281de4ea)</Message> <Timestamp>2016-06-21T06:42:53.2293492Z</Timestamp> <InnerFault i:nil="true" /> <TraceText>
前段时间复制实体时候遇到这样一个错误.
但是又不想赋值权限,最后在调试中发现一个属性: overriddencreatedon
去掉之后就不报错了。
retrieve.Attributes.Remove("overriddencreatedon"); retrieve["ownerid"] = new EntityReference("systemuser", context.UserId); //Remove the parent record id of the retrieved associated record retrieve.Attributes.Remove(childEntity.ParentFieldName); retrieve.Attributes.Add(childEntity.ParentFieldName, cloneCourseEntity.ToEntityReference()); TracingService.Trace("create the cloned record" +childEntity.EntityName); retrieve.Id = service.Create(retrieve);
以上是关于[Dynamic Crm] missing prvOverrideCreatedOnCreatedBy privilege的主要内容,如果未能解决你的问题,请参考以下文章