What is ProjectOrderLine?

For a specific 16 projects in our system, I get this error if I try to open Project Entry:

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Table: ProjectOrderLine
Company=‘29632’ OrderNum=‘29851’ OrderLine=‘1’ SysRowID=‘935c8581-a5b8-4df4-8559-a2cd4f266a61’: ForeignKeyConstraint ProjectOrderLine requires the child key values (29632, ) to exist in the parent table.

Long story short, it is the phases that are messing this up. I can delete and re-add the projects with DMT all day long. But I can never get rid of the phases for these projects. I still see them after deleting, with a BAQ. And if I try to delete the phases with DMT, I get that same error all 32 times.

I have had problems before with the link between projects and order lines and with phases and order releases, and have always found a way around it. But it’s been over a week and I am still stuck.

So maybe you all can help me with whatever the error is trying to tell me.

What is ProjectOrderLine?

It says it’s a table, but that’s not true; I can’t even find it in SSMS. It also says it’s a “ForeignKeyConstraint,” but I have no idea what that is.

I know there is a DMT in “Project Entities” for “Sales Order Line.” It mimics the “add” feature of Project Entry. But all I thought it did was put the project number in the project field on OrderDtl. But now I wonder if there is some other link in the background…

image

image

I think your issue is on Sales Order Detail. You can only reference a Sales Order Line number on a Project Phase just once. And I don’t know why. You can reference the Project alone on a Sales Order as many times as you want but a phase can only be referenced on a sales order once. So we always left the phases off of the sales order detail lines.

1 Like

I GOT IT!!!

There is an Order Number and Order Line on the phases. I made a uBAQ to be able to update them, and now it all works.

@Mark_Wonsil I totally agree that that was the rootest of root causes, though. The phase field on the order release is just evil and has caused nothing but problems.

2 Likes