Just met the issue after the new D365 update
issue appears when import SalesLines using data entity:
- SalesOrderLineV2Entity
- SalesOrderLineV3Entity
Error message:
'1' 'Sales order lines V2' record(s) inserted in staging
Results. Cannot edit a record in Order lines (SalesLine).
The operation cannot be completed, since the record was not selected for update. Remember TTSBEGIN/TTSCOMMIT as well as the FORUPDATE clause.
Results.
After research I've fount that it's caused by new block of code on entity method insertEntityDataSource()
Original code selected salesLine not for update.
New block of code (since 10.0.40) has scenario when SalesLine record can be updated.
This causes the error, because record was not selected for update.
This line of code is missing second argument, to select for update :
SalesLine salesLine = SalesLine::findInventTransId(this.InventoryLotId);

Report
All responses (
Answers (