Skip to main content
Dynamics 365 Community / Forums / Sales forum / Error when creating an...
Sales forum
Suggested answer

Error when creating an opportunity

editSubscribe (0) ShareShare
ReportReport
Posted on by 36

Hi,

When I create and opportunity and try to save the record I receive the following error message/code:

pastedimage1618996050499v2.png

An unexpected error occurred.

Error code: 0x80040216Session Id: d3d374d2-11a6-4b05-8670-2a85c493439eActivity Id: 865fb773-d2f0-4366-afc1-6ee6a386a99aTime: Wed Apr 21 2021 11:03:34 GMT+0200 (Central European Summer Time)
What could be the reason for this?
  • l.oliver Profile Picture
    l.oliver 36 on at
    RE: Error when creating an opportunity

    Hi Wahaj Rashid,

    Thank you very much for your reply.

    I have downloaded the log file:

    Exception Message: An unexpected error occurred.

    ErrorCode: -2147220970
    HexErrorCode: 0x80040216

    ErrorDetails:
    ApiExceptionSourceKey: Plugin/Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin
    ApiStepKey: ac528ab4-6e86-eb11-b1ad-000d3a3a1b5d
    ApiDepthKey: 1
    ApiActivityIdKey: f0e642d6-f872-4552-8230-22561910b3f6
    ApiPluginSolutionNameKey: System
    ApiStepSolutionNameKey: System
    ApiExceptionCategory: SystemFailure
    ApiExceptionMesageName: UnExpected
    ApiExceptionHttpStatusCode: 400

    HelpLink: go.microsoft.com/.../

    TraceText:
    [Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
    [ac528ab4-6e86-eb11-b1ad-000d3a3a1b5d: ]

    Activity Id: 2b8e95cf-bc3e-4c4c-9e36-1407391c03f8

    And this is what I found in DevTools:

    pastedimage1619039472748v1.png

    Do you have any suggestions based on the log file or screenshot of dev tools for what I should do?

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,317 on at
    RE: Error when creating an opportunity

    Hi,

    Seems like you have a JavaScript function registered on the Save which is failing.

    Can you download the log file? It should have more details. 

    You can also use Dev Tools and keep an eye on the console to see the error.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,030 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans