Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : 7fNa/roU9hVwWUHVx0/Wo5
Microsoft Dynamics CRM (Archived)

Error on closing Opportunity as Won

Like (0) ShareShare
ReportReport
Posted on 8 May 2019 02:02:47 by 316

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

  1. {"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
    316 on 08 May 2019 at 04:24:30
    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
    316 on 08 May 2019 at 03:55:17
    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
    55,410 Moderator on 08 May 2019 at 03:39:00
    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
    316 on 08 May 2019 at 03:28:20
    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
    55,410 Moderator on 08 May 2019 at 03:04:27
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,533 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,619 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans