I have a few salespeople reporting to me that they can close (won/lost) some of their quotes but not others. The log file gives a generic "Cannot Update a Read-Only EntityDetail:" (see details below). Based on that log file, it gets as far as the ValidateForUpdate() before it throws the exception.
I am fairly sure it is a security role issue because a System Administrator can close the quote.
The salesperson is the owner of the quote and they have all business-unit rights to the quote entity.
There are 3 referential lookup fields on the quote and the salesperson has full organization rights to those entities.
The quote is not part of the BPF.
Any thoughts where I should look?
Here is the log file downloaded:
Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: Cannot Update a Read-Only EntityDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ActivityId>76b0998a-1445-4b28-9c6d-3534a2e8ab28</ActivityId>
<ErrorCode>-2147220946</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>CallStack</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string"> at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.Dynamics.Solution.Common.CrmException.BuildOrganizationServiceFault(Exception innerException, Int32 errorCode, Int32 statusCode, String message)
at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode, Int32 statusCode, Boolean isFlowControlException, Boolean enableTrace)
at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode, Int32 statusCode, Boolean isFlowControlException)
at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Int32 errorCode)
at Microsoft.Crm.Sales.ObjectModel.QuoteService.ValidateForUpdate(Quote preImage, Quote quote, IPluginContext context) at Microsoft.Dynamics.Sales.Plugins.PreOperationQuoteUpdate.ExecuteCrmPlugin(LocalPluginContext localContext)
at Microsoft.Dynamics.Solution.Common.PluginBase.Execute(IServiceProvider serviceProvider)
...snip
[Microsoft.Dynamics.Sales.Plugins: Microsoft.Dynamics.Sales.Plugins.PreOperationQuoteUpdate]
[16e34e29-2155-e611-810a-00155dacf82e: Pre-Update validation of quote]
Entered Microsoft.Dynamics.Sales.Plugins.PreOperationQuoteUpdate.Execute(), Correlation Id: 1ab9bcd2-fd6c-40d6-9557-6db43071e312, Initiating User: 734e69f5-391b-e911-a870-000d3a33a9a3
Exception: Microsoft.Dynamics.Solution.Common.CrmException: Cannot Update a Read-Only Entity (Fault Detail is equal to Exception details:
ErrorCode: 0x8004022E
Message: Cannot Update a Read-Only Entity
StackTrace:
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.Dynamics.Solution.Common.CrmException.BuildOrganizationServiceFault(Exception innerException, Int32 errorCode, Int32 statusCode, String message)
at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode, Int32 statusCode, Boolean isFlowControlException, Boolean enableTrace)
at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Exception innerException, Int32 errorCode, Int32 statusCode, Boolean isFlowControlException)
at Microsoft.Dynamics.Solution.Common.CrmException..ctor(String message, Int32 errorCode)
at Microsoft.Crm.Sales.ObjectModel.QuoteService.ValidateForUpdate(Quote preImage, Quote quote, IPluginContext context)
at Microsoft.Dynamics.Sales.Plugins.PreOperationQuoteUpdate...)., Correlation Id: 1ab9bcd2-fd6c-40d6-9557-6db43071e312, Initiating User: 734e69f5-391b-e911-a870-000d3a33a9a3
Exiting Microsoft.Dynamics.Sales.Plugins.PreOperationQuoteUpdate.Execute(), Correlation Id: 1ab9bcd2-fd6c-40d6-9557-6db43071e312, Initiating User: 734e69f5-391b-e911-a870-000d3a33a9a3
</TraceText>
</OrganizationServiceFault>
------------------------------
Thanks.
Nelson Johnson, Solution Architect
BroadPoint, Inc., Bethesda MD
Link with me!
https://www.linkedin.com/in/nelsonjohnson/------------------------------