Cannot update PO due to expiration - Ax 2012

Hi Team,

We have come across a strange error on just modifying a PO. A PO was created with 8 lines and a line was revised and the same line deleted successfully confirmed. However when the user attempts to create a new line, system is throwing as error

“Cannot edit a record in purchase line history (Purchlinehistory). Invalid value specified for ‘Exprration’. It has to be less than the expiration of next record.”

On the PurchLineHistory table, we see the deleted line (and its versions) and has a value in the ValidTo column. All other PO lines hold the value “Never”. What we are not able to figure out is what caused the change of the value in that column to a specific date. Tried recreating the issue, but in vain. The only solution we have found so far is by deleting the problem records in the PurchLineHistory table.

Has anyone encountered this problem before? This was a very normal PO modification that happens realistically.
Thanks,
Pranav

Hi All,

Has anyone encountered this error?

Pranav…

We are facing this same problem ( same error message) when trying to modify unit price on a PO.

Did you ever find a solution?

Hi Robert,

We haven’t got any solution yet. Till now we have faced this issue in two PO and in both case we deleted record from purchlinehistory table. I also observed that an extra line was getting created in purchline table (which user deleted from front end) but was not getting displayed. That line only had reference in purchlinehistory table.

I think this is a bug, but don’t have repro steps so that i can log to microsoft.

Pranav…

Thanks Pranav,

Your idea to delete the purchlinehistory worked to get our particular sales order resolved. We appreciate the workaround. This is the second instance of this that we have experienced. In neither case have we been able to determine what context is causing this error…and we haven’t been able to replicate to create a reasonable post to Microsoft.

Regards,

Bob

Hi Robert,

Ya… this workaround works but this is not a solution. If you get any solution, please share here. We have many issues in 2012.

Pranav…

Are you using any additional custom solutions for creating POs? For example a third party solution of some kind?

No. We have faced this issue in standard environment.

Pranav…

Any solution for this case??

Hello,

anyone got lucky solving this? i’m stuck with PurchLineHistory as well.

and dear Pranav, did you experience any side effects after deleting from the PurchLineHistory table?

Hi,

I was having the issue this week. here are my repro steps

1- create purchase order with one line
2- modify the purchase order line and confirm the purchase order
3- repeat step 2 more than 2 times. (the goal is to create at least 3 versions of the PO)
4- delete the line
5- Create a line with similar information (different item) and re-confirm
6- edit the line and save.

It is a known Microsoft bug, which seems to be fixed in CU-4. For previous versions, i requested a Hot-fix using the KB#2730201.

I hope this helps.

This hot fix worked for us - mostly. We were able to delete several of the offending PO’s. But since the Hotfix was installed, now we’re getting this: “Cannot edit a record in Order line foreign trade category history (PurchLineForeignTradeCategoryHistory). Invalid value specified for ‘Expiration’. It has to be less than the ‘Expiration’ of the next record.”

Any ideas?