cancel
Showing results for 
Search instead for 
Did you mean: 

Contact Us error:"Message The INSERT statement conflicted with the FOREIGN"

Former Member
0 Kudos

We are just trying to post a question using the Contact us interface. The referenced table, dbo.SupportSections, is empty so I am not sure why an indexing error is occuring. Any ideas?

Version 2007.1.651.1

Message The INSERT statement conflicted with the FOREIGN KEY constraint

"FK_SupportTickets_SupportSections". The conflict occurred in database "B1WebTools", table

"dbo.SupportSections", column 'SectionID'. The statement has been terminated.

Source .Net SqlClient Data Provider

Stack at netpoint.api.data.DataFunctions.ExecuteScalar(String SQL, IDataParameter[] parameters, String

connectionstring)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you. I just think something isn't set up. I don't have any Sections defined. The supportsections table is completely empty. Also, when adding a ticket (contact us) it doesn't really tell us anything about what section ID it is using. So that may even be null. Is this functioality all web-side or is there something in B1 that ties to it?

Former Member
0 Kudos

I would concur with your assessment that something isn't set up correctly.

I'll be honest, I've never used this functionality before, all I was able to do was interpret the literal SQL error message.

If I were you, I would poke around the admin side and try to find where you can add records to the SupportSections - I doubt you'd have to manually add them via SQL statements.

Former Member
0 Kudos

Yeah , I think the url probabaly has something like "sectionid=1" so that means it's trying to create a ticket in the support queue 1 which doesn't exist. If you create a support queue the id for the first one will be "1" so that should essentially re-link everything and it should work.

The problem is with the default data that is installed with webtools.

Answers (2)

Answers (2)

Former Member
0 Kudos

I've tried posting a couple times and it doesn't seem to be going through. One last try...

I figured this out. A support queue is the same thing as a support section ID. Adding a queue created a support section and that corrected the error.

Former Member
0 Kudos

My best guess is as follows:

When adding a SupportTicket, it must match a SupportSection. The constraint "FK_SupportTickets_SupportSections" ensures that every SupportTicket matches a corresponding SupportSection, on SupportTicket.SectionID=SupportSection.SectionID.

Try ensuring that your SupportSection has a record with a SectionID that matches the SectionID of the SupportTicket record you are trying to add and let me know how it turns out.