SBX - Search With Button

SBX - Forum Post Title

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

Microsoft Dynamics AX Forum

Codehunter asked a question on 8 Nov 2018 2:57 PM
My Badges

Question Status

Verified

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 . 

Reply
ievgen Miroshnikov responded on 8 Nov 2018 9:08 PM

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.

Reply
Codehunter responded on 9 Nov 2018 12:42 AM
My Badges

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

Reply
Martin Dráb responded on 9 Nov 2018 1:18 AM
Verified Answer

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

Reply
Codehunter responded on 9 Nov 2018 1:28 AM
My Badges

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

Reply
Martin Dráb responded on 9 Nov 2018 1:39 AM

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.

Reply
Codehunter responded on 9 Nov 2018 1:44 AM
My Badges

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

Reply
Suggested Answer

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

Reply
Martin Dráb responded on 9 Nov 2018 1:18 AM
Verified Answer

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

Reply
Suggested Answer

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

Reply

SBX - Two Col Forum

SBX - Migrated JS