Order line status does not agree between sales order and database

I am looking at a sales order in epicor to see what db field is being used for line status and found that it is OrderDtl.LineStatus

But if I query my db and look at the field, the values do not math, how can this be?

image

Is this a bug?

What does your BAQ look like. I just did the same test, and mine look ok.

I think you want to ignore the line status field and do your filtering on OpenLine. I am not sure what is going on with your data. I never use LineStatus, just OpenLine.

I ended up using the OpenLine field and creating my own Line Status calculated field after seeing this issue. My BAQ is the OrderDtl table linked to the OrderRel table on OrderNum and OrderLine.

I am wondering if anyone else is seeing this? I don’t know how it would be correct in epicor if it is using the field that clearly has the wrong value in it. Unless it is really not using that field and getting the status based of the open line field.

I am also seeing this behavior on a BAQ I’m trying to add OrderDtl.LineStatus to. All lines of this example order are closed but when adding this field to our DropShip Order BAQ, it only returns “OPEN” as a value.

image

image

Any updates on this issue? The user that that requested it wants to view the lines that are open/closed/voided all in one spot. :confused:

Maybe I’m oversimplifying this, but wouldn’t this calculated field in the BAQ work?

case
when OrderDtl.VoidLine = 1 then ‘Voided’
when OrderDtl.OpenLine = 1 then ‘Open’
else ‘Closed’
end

Mark, I might be wrong, but I think we had this issue a few years ago, and Epicor’s response was to ignore the OrderDtl.LineStatus field, that it’s not actually used for anything.

1 Like

That would probably work fine. I was just confused as to why a field on OrderDtl wasn’t accurately pulling over.

Thanks for the suggestion!

1 Like

Oh No! Our Table! It's Broken! on Make a GIF