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

Notifications

Announcements

No record found.

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 668

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,565 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,827 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,345 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans