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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to lock a specific record to process from other process.

(0) ShareShare
ReportReport
Posted on by 672

Hi Folks,

I want to process a specific record but need to lock this record so it will not be processed by other users/ any running pre defined batch job.

Could anyone please help me out on this.

Thanks in advance!!

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi, You can check how system is Blocking the journals and try to replicate it.

    pastedimage1683284313413v1.png

  • Suggested answer
    GirishS Profile Picture
    27,843 Moderator on at

    Hi,

    You can use Pessimistic lock but I think it will affect the performance.

    https://learn.microsoft.com/en-us/dynamicsax-2012/developer/optimistic-concurrency-control

    https://dev.goshoom.net/2011/10/pessimistic-locking/

    Refer to the below blog.

  • Anton Venter Profile Picture
    20,678 Super User 2026 Season 1 on at

    As soon as you select a record using "forUpdate" inside a transaction scope (ttsbegin), that record cannot be changed by someone else until the transaction is comitted by the process who started the transaction by calling ttscommit. This is a simplified description of how this works but that's basically the idea.

    If you are working "outside" transaction scopes with multiple users editing data at the same time and just want a "single user mode" type functionality for records. You can add some custom fields to the table that indicate it's locked and by who. Logic can be added to allow only editing accordingly.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 258 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans