Recently got the below error while updating a record. It was surprising as we were just saving the record to which we had full access.
The good thing was that the log file had the correct message\information about the error
The error was because of access denied error while trying to write something to a text file inside plugin code.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Access is denied.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”> <ErrorCode>-2147187707</ErrorCode>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
<Message>Access is denied.</Message>
<InnerFault i:nil=”true” />
[7e507fe4-3605-e111-9e2c-00155d2a49c7: testPlugin.Class1: Update of lead]
Few days back also one friend of mine was getting the same issue, however it was while importing the solution. Not sure how it was fixed for them. It might be some custom code throwing exception.