locked
MS Dynamics CRM 2011 - Quotes ACTIVATION error RRS feed

  • Question

  • Hi,

    Good day,

    I have created a plugin for QUOTES entity. The function of the plugin is to fetch total amount value from Quotes Product entity and display to the custom fields i have created in the Quotes entity. When i ACTIVATE a quote, I'm having an error that looks like this: 

    I have downloaded the LOG FILE as well. Please see below log details:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: (Exception) QuotesPlug-inThe entity cannot be updated because it is read-only.
       at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Update(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
       at Microsoft.Crm.Extensibility.InprocessServiceProxy.UpdateCore(Entity entity)
       at NexusPluginLibrary.Quotes.Execute(IServiceProvider serviceProvider)
    Detail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147220891</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
        <KeyValuePairOfstringanyType>
          <d2p1:key>OperationStatus</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
        </KeyValuePairOfstringanyType>
      </ErrorDetails>
      <Message>(Exception) QuotesPlug-inThe entity cannot be updated because it is read-only.
       at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Update(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
       at Microsoft.Crm.Extensibility.InprocessServiceProxy.UpdateCore(Entity entity)
       at NexusPluginLibrary.Quotes.Execute(IServiceProvider serviceProvider)
    </Message>
      <Timestamp>2013-11-18T08:14:24.7568944Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText>

    [NexusPluginLibrary: NexusPluginLibrary.Quotes]
    [6561b262-1a16-e311-8bd5-36d7c49cdbe8: NexusPluginLibrary.Quotes: Update of quote]


    </TraceText>
    </OrganizationServiceFault>

    Please advise what i need to adjust in the plugin/what i should do to avoid the error.

    Appreciate any help.

    Thank you.

    Regards,

    Honey

    Monday, November 18, 2013 8:26 AM

All replies

  • Hello,

    your plugin is running after quote activated (redonly), that's you are getting this error, on which event you registered your plugin ??


    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, November 18, 2013 8:50 PM
    Moderator
  • Hi,

    Sorry for the late response. I was out of the office when you replied.

    I have created 2 steps for the Plugin, one for create and other one for Update. The error is for the Update message right?

    For the Update i have set the event to post-operation.

    Thanks and regards,

    HONEY

    Tuesday, November 19, 2013 2:02 AM