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 :
Microsoft Dynamics AX (Archived)

Form/record in edit mode for another user

(0) ShareShare
ReportReport
Posted on by 115

Is it possible to detect if another user has a specific form/record open in edit mode?

Let's say that two users have the Customer details form open for customer "1000".  User #1 has the form open in edit mode and user #2 has the form open in view mode.  User #2 then clicks on "Edit" - could it be detected that user #1 has the form/record open in edit mode so that user #2 could be notified or blocked from editing the record at that time?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Jonsi,

    No, this is not possible. If user #1 and #2 are trying to edit, AX works with optimistic concurrency. If user #1 submits changes (record saved) and then #2 also saves the record, user #2 will get an error stating the record was changed. He then has to apply his changes again.

  • Jonsi Profile Picture
    115 on at

    Thanks for your response André.  I'm aware of the optimistic concurrency being used by Ax but I'm actually trying to warn the user beforehand.  The users I'm dealing with complain that sometimes they make a few changes to a record only to be told that they cannot save their changes because someone else edited the record a moment earlier.  That's why I want to be able to tell them as soon as they click on "Edit" that someone else is already editing the same record.  So the question stands as "can I detect if the form/record is in edit mode by another user when the Edit button for a record is clicked?"

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Hi Jonsi.

    AX typically follows a blocking methodology when trying to accomplish the above. Look at the various journals for examples. Basically the record is marked as locked for use when the user edits lines and unlocks the record when closing the form.  You could build similar functionality if you are working with limited number of record types, however todo it on a global scale may be alot harder.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Jonsi,

    Assuming you were not aware of the optimistic concurrency, I provided the above answer trying to tell you you don't have to worry...

    Have a look at this article: technet.microsoft.com/.../aa569634.aspx and

    msdn.microsoft.com/.../bb190073.aspx

    There is a way to control the Optimistic Concurrency.

    Further about your question: It is possible to control whether only one form is opened. It is used on the form Costing sheet. Inventory management > Setup > Costing > Costing sheet.

    It is not possible to find out the state Edit or View. Also it is not possible to find out which record is selected on the same form by another user.

  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at

    If you use the forUpdate keyword, the concurrency model used will be that which was set on the table.”

    “The concurrency model is set on all tables in the standard application. The majority of tables use optimistic concurrency.”

    Those indicate that forUpdate would use optimistic concurrency for the majority of tables.  But from most of what I’ve read, forUpdate locks the selected records as soon as they are selected, instead of waiting until an actual update is attempted.  Those seem contradictory.

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Hi Jonsi.

    Your question has had me thinking today. I have an alternate suggestion for you (I take no risks as to the outcomes)

    Take a look at the SysSetupFormRun class, at the task method. This method appears to be called everytime the form mode is changed to "View or Edit". 

    Using this method you could retrieve the original record and write to a record to a blocking/semaphore table as soon as a user sets the form to edit mode. If any other user tries to set the form to edit mode, do a read from the blocking/semaphore table to determine whether the record is locked. If it is overwrite the form mode request and maintain the form in view only mode. You could even write code to do this only for certain forms.

    As a disclaimer I think this may require very careful maintenance to get it to work properly. I'd rather rely on the default AX functionality. But this may at least get you thinking.

    https://community.dynamics.com/ax/f/33/t/108051.aspx

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans