Cannot Save Record has been modified by another user(SOLVED)

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Cannot Save Record has been modified by another user(SOLVED)

Post by ddumas »

I have an OnlineMeeting BO where I am guessing that error is displaying on Save, when one user made a change, but has not saved yet, and another user is trying to save a change to the same instance?

Example: One user is trying to update the OnlineMeetingURLlink attribute, and has not saved yet, and other user is editing the Notes attribute for the meeting and clicks save.

So, while I understand the dilemma, I am wondering if there is a creative solution that will serve as a workaround, or a fix, or ideas that other have used in this situation.

Dave
Last edited by ddumas on Mon Feb 17, 2020 5:41 pm, edited 1 time in total.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Cannot Save, Record has been modified by another user

Post by tford »

You could add a "EditingInProcess" flag which gets turned on when one user is editing the record. If that flag is turned on, then another user could be denied access for editing.
Tom - V8.8 build 3137 - MySql / PostGres
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Cannot Save, Record has been modified by another user

Post by BLOMASKY »

and you can add the refresh button. so when the 2nd user gets the msg, they can reload the data while staying in the form.

Bruce
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: Cannot Save, Record has been modified by another user

Post by ddumas »

So I ended up adding an Editing Flag only because I have a Meeting that has 2 phases. Once phase one is done, I set the Editing "phase" to locked, and that starts phase 2. That works. However, I really like the refresh button idea also. I wish there was a way to change the "another user has changed the record..." message, so they could be alerted to refresh.
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Cannot Save, Record has been modified by another user

Post by BLOMASKY »

It would be more work but....

Create a BO called onlineMeetingTransactions (or perhaps better still, a non-persistent BO with all of the columns that are editable in the onlineMeeting BO.

Then have a process that looks like
FIND OnlineMeeting where .....
ENTER NEW nonPersistantBO with NPBO.attribute1 = OLM.attribute1.....

The form has a save button and have a process that runs after that looks like
FIND OLM where ...
IF OLM.attribute1 <> NPBO.attribute1 ... THEN REPORT ERRROR
The data was changed by some other dude, click the super special button on the form to reload it
ELSE
OLM.attribute1 = NPBO.attribute1 ....

Bruce
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Re: Cannot Save, Record has been modified by another user

Post by ddumas »

Thanks, I thought about that as well. Since I have a 2 phased process, my Organizer Locked Flag works fine. I have a Panel Operation that calls a process that sets the flag and does a commit transaction (my favorite AWareIM command), so I never go into "Edit mode". Any other users that are already in edit mode, I actually want to get the stale record message, so it works out great. Then the "Master user" Meeting Organizer is the one that can do edits.
Post Reply