Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Opportunity closing as won - duplicate key error

(0) ShareShare
ReportReport
Posted on by

Hi,

We upgraded to 9.0 on Saturday & cannot close any opportunities as won. Which is of course causing a lot of issues. We have raised with Microsoft but no solution has been provided as of yet 3 days later. Therefore it would be greatly appreciated if any light could be shed on this issue. I recorded the below video which shows what is happening.

www.useloom.com/.../a5b911dab23e440eb690397f6b4288ab

ErrorDetails-_2800_18_2900_.txt

Cheers

Stuart

Categories:
  • RE: Opportunity closing as won - duplicate key error

    Hi,

    Yes its already read only but on the WF create record order step it still has an asterix against it and needs a value?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Opportunity closing as won - duplicate key error

    Stuart,

    I meant not to remove but to disable (field is read-only in field properties on the form).

  • RE: Opportunity closing as won - duplicate key error

    Hi Andrew,

    Thanks for response. How do you mean disable? It is a mandatory field so I can't remove it off form.

    Cheers

    Stuart

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Opportunity closing as won - duplicate key error

    Hello Stuart,

    That field should be populated by default. Here is what you should try to do:

    1. Disable that field on Order form and publish changes

    2. Delete that step in the workflow that created Order.

    3. Recreate the step that creates Order.

    4. Save and publish that workflow.

    That should eliminate your issue.

  • RE: Opportunity closing as won - duplicate key error

    Hi Andrew,

    I did find the guilty workflow. It was the WF that created the order and the 'order id' was the issue. In the WF it is trying to create every order with order id field value of '1'.

    It is a mandatory field on the workflow so it forces me to put a value in this field, what value should I put so it goes back to generating the generic order numbers? Ive put in execution time for now just to get things working but this will still cause an error soon.

    order-id-wf.PNG

    Thanks in advance.

    Thanks

    Stuart

  • LeoAlt Profile Picture
    LeoAlt 16,331 Moderator on at
    RE: Opportunity closing as won - duplicate key error

    Hi Partner,

    Did you use "AssociatedEntitiesRequest" ?

    If so ,this function has been deprecated and you should be using the "AssociateRequest" instead.

    In addition, you could refer to what's new for developers in Dynamics 365 V9 and check if the code has been updated.

    Hope it helps.

    Best Regards

    Leo

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Opportunity closing as won - duplicate key error

    Hello,

    My recommendation - open plugin registration tool and check for steps that handle "Win Opportunity" message. I believe there will be some - try to deactivate one by one to find "guilty" one.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans