I'm experiencing the same issue. Have you made any headway?
We found that the resolution is to delete the record from purchlinehistory table and it will allow you to edit the purchase line.
This workaround in allready we are following.. but this is not solution. Asking client to delete record from backend is not suggested.
We are having the same issue... any idea what causes this, or an update on how to resolve it?
I'm still deleting the records. I've only seen it happen a couple of times. I think it is caused when a change is made, but it runs a long time and the user kills the session.
I have came across a similar situation when dealing with Intercompany orders. There are two legal entities in this scenario. One legal entity creates actual SO for external customer and using intercompany and direct delivery features of standard AX the linked intercompany PO and SO are created, when end user tries to update Unit price in original SO for external customer they come across the same error:
“Cannot edit a record in purchase lines history. Invalid value specified for expiration. It has to be less than the 'Expiration' of the next record.”
We can not ask client to delete the records from Production environment as it runs into compliance issues for having developer accessing LIVE environment.
Does anyone know a solution/fix for this? is it a bug that needs a hotfix from MS?
I just got a hotfix from Microsoft. It's apparently not publicly available yet so you have to open a support case to get it. Hope this helps!
Can you please post the KB article number. That would help me in sending a request to microsoft for hotfix.
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".
You should be able to get around with this by changing first update_recordset statement in \Classes\VersioningPurchaseOrder\archivePurchLine. I added one more where clause so that AX does not try to update lines with max date value.
setting ValidTo = prevVersionValidTo
exists join purchLine
where purchLine.InventTransId == purchLineHistory.InventTransId
&& purchLine.PurchId == purchTable.PurchId
&& purchLineHistory.ValidTo == DateTimeUtil::maxValue();//skip lines with max date values
The hotfix number is wrong. You need fixing using KB2901696. See Lifecycle services for additional details.