Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Error on closing Opportunity as Won

Posted on by 310

Hi, we are using CRM online.

I am getting this error when opportunity is closed as Won.

It is happening only for this Opportunity.

2134.error1.JPG

{"ActivityId":"bc34ffd1-05e9-4963-8cf1-9333688eab24","errorCode":2147746405,"message":"Cannot find record to be updated","stacktrace":"   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary`2 optionalParameters)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary`2 parameters, Dictionary`2 boundParameters)\r\n   at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary`2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n   at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass9_0.<PostUnboundAction>b__0()\r\n   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()","Timestamp":1557280782201}


Any suggestions?

Thanx.

*This post is locked for comments

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Error on closing Opportunity as Won

    community.dynamics.com/.../754687 this has a solution but I am not able to find the id in the js file.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Error on closing Opportunity as Won

    Yes I have couple of JS scripts on Save. Everything was working fine. Why the error suddenly?

    I will check the scripts.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Error on closing Opportunity as Won

    This is a JavaScript error, check if you have any JS on save. If not then this must be some internal script which is dependent on some other field.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Error on closing Opportunity as Won

    Thanx Ravi for your help.

    Figured the issue. A contact was selected instead of an account in Potential Customer Field.

    I am getting this on Saving an Opportunity.

    0116.error2.JPG

    IT gets saved though after clicking Ok on this popup.

    Thanx.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Error on closing Opportunity as Won

    Hi,

    Basic troubleshooting is to find if this is occurring because of any Plugins/ workflow. You can do this by disabling all of them and see if it works. If it works then you need to enable/ disable one by one to find the exact plugin/ workflow. Also check if this is happening for all records or few, if only few records then compare the working & non-working records i.e. if it is related to any fields present or missing.

    Below are some thread which states that this is usually occurs from a workflow-

    community.dynamics.com/.../123979

    community.dynamics.com/.../255169

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans