码迷,mamicode.com
首页 > 数据库 > 详细

[Dynamic Crm] missing prvOverrideCreatedOnCreatedBy privilege

时间:2016-06-22 14:10:15      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:

<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

标签:

原文地址:http://www.cnblogs.com/KingK/p/5606888.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!