Hi Folks,
I am updating parentaccountid of the Account entity with a following C# code, this code was working fine few months back, but I am receiving exception.
EntityReference primaryContactId = new EntityReference("account", Guid.Parse(item.Attributes["accountid"].ToString()));
chainitem["parentaccountid"] = primaryContactId;
_orgService.Update(chainitem);
User has System Administrator and System Customizer roles
{Exception details:
ErrorCode: 0x80040220
Message: Principal user (Id=436ce728-239b-e811-a99b-000d3a36fc04, type=8, roleCount=2, privilegeCount=818, accessMode=0, is missing prvReadnew_valotisheader privilege (Id=2e85a2e4-1627-4a44-b57a-d6fd27d1723a) on OTC=10054. context.Caller=4397ce72-ad86-47a1-8b2d-b747224ed86d
TimeStamp: 2019-07-09T19:07:23.7711433Z
--
Exception details:
ErrorCode: 0x80040220
Message: Principal user (Id=436ce728-239b-e811-a99b-000d3a36fc04, type=8, roleCount=2, privilegeCount=818, accessMode=0, is missing prvReadnew_valotisheader privilege (Id=2e85a2e4-1627-4a44-b57a-d6fd27d1723a) on OTC=10054. context.Caller=4397ce72-ad86-47a1-8b2d-b747224ed86d
TimeStamp: 2019-07-09T19:07:23.7711433Z
--
Exception details:
ErrorCode: 0x80040220
Message: Principal user (Id=436ce728-239b-e811-a99b-000d3a36fc04, type=8, roleCount=2, privilegeCount=818, accessMode=0, is missing prvReadnew_valotisheader privilege (Id=2e85a2e4-1627-4a44-b57a-d6fd27d1723a) on OTC=10054. context.Caller=4397ce72-ad86-47a1-8b2d-b747224ed86d
TimeStamp: 2019-07-09T19:07:23.7711433Z
--
}
I'll appreciate for any guidance or help.
Thanks and Regards,
Alex
Hi,
Based on the error messages, it looks like you have created a new entity with scehma name "new_valotisheader" and somehow, during you account update, read permission is required for this entity.
If you assign the read permissions then it should fix the issue. Please ensure that you assign it to the user mentioned in your logs-Principal user (Id=436ce728-239b-e811-a99b-000d3a36fc04
Hope this helps.