Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Error: AIF service Duplicate key exception.Creation has been cancelled

Posted on by 10,270

Guys,

i tried to fire an update method from AIF Service outside AX but an error occurred "Duplicate Key exception.Creation has been cancelled. the record already exists". However, it only exists one record in the table.

Anybody knows how to solve this issue . 

*This post is locked for comments

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    Then you need to get admin privileges on your development machine.

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    i did try and i was asked to change the credentials to start running the debugger.

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    I don't know, I've never thought about stop being admin on development boxes.

    If you're in such a situation, simply go and try it. You can find it out, I can't, therefore asking me won't help you.

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    Thsnkd Martin but this action needs to be the admin to run this process on the debugger,isnt it?

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    In AX 2012, web services run in CIL and therefore you must use the debugger in Visual Studio.

  • Codehunter Profile Picture
    Codehunter 10,270 on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    So is it possible to attach process AXserv to debug the AIF service through Visual studio or use debugger to do debugging ?

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Error: AIF service Duplicate key exception.Creation has been cancelled

    Hi Codehunter,

    You need to debug and see which record gets updated, you can follow this blog blogs.msdn.microsoft.com/.../debugging-aif-web-services for details.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans