Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Another user has modified the record Error from WebService

(0) ShareShare
ReportReport
Posted on by 517

I just tested it and I do get the error.

Code: Select all

Another user has modified the record for this Item after you retrieved it from the database.  Enter your changes again in the updated window, or start the interrupted activity again.  Identification fields and values:  No.='1000'

From webservice.

My test codeunit looked like this.

Code: Select all

Item.GET('1000');

SLEEP(10000);

Item.VALIDATE(Description,'Bicycle WS');

Item.MODIFY;

So while the WS was waiting I modified the description on the item with another client.

*This post is locked for comments

  • Verified answer
    Jens Glathe Profile Picture
    6,092 on at
    RE: Another user has modified the record Error from WebService

    Hi Mouli,

    yes that's correct. While the WS process was waiting on sleep your item record became outdated from the modification of the other process. That's how it should work. If you want to grant exclusive access to the WS, then you need to lock the item table. And, depending of the context (WS with a page and a codeunit), you may also need a SELECTLATESTVERSION to get the current version of the records. The WS code should look like this:

    SELECTLATESTVERSION;

    Item.LOCKTABLE;

    Item.GET('1000');

    SLEEP(10000);

    Item.VALIDATE(Description,'Bicycle WS');

    Item.MODIFY;

    This code will only execute when LOCKTABLE() succeeds. But that's the point :)

    with best regards

    Jens

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans