Retail Store Connect error 4099

Hello,

I am having a real problem with the Retail Store Connect and AXRETAILMSG database. I started getting the error 4099 in the A-job scheduler and P-jobs are not coming back from the stores.

I checked the Event Viewer on the AX server and this error has been repeating for the last several hours: "The INSERT statement conflicted with the FOREIGN KEY constraint “FK_OutgoingMessages_IncomingMessages”. The conflict occurred in database “AXRETAILMSG”, table “dbo.IncomingMessages”.

I thought that restoring the message db to a few days ago and even the original blank one might clear it up but it didn’t.

Does anyone know what the problem is?

Thanks, Hank