web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Cannot edit a record in Order lines (SalesLine). Record was not selected for update.

(1) ShareShare
ReportReport
Posted on by

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);

1.jpg
2.jpg

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    306,703 Super User 2026 Season 2 on at
    Hi,

    Do you have a question? In case you find a bug, you can create a ticket for Microsoft Support. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 260 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 224 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans