6 Replies Latest reply on May 21, 2010 11:38 AM by mps1773

    Record locking problem



      Record locking problem


      We are having a problem with record locking that I just can't seem to get my head wrapped around.  The problem arises on a layout that is central to work management in the organization.  This layout stays open in many static locations and is accessed by many more, on and off.  We are using FMSA11 on OSX 10.6.  Clients having this problem are FM/FMA 11.  This problem has persisted since FM[A/SA]10 but is becoming more of a problem as the company continues to grow.


      Here is the basic structure:


      The layout is based on the TO "Assignments_EmployeeCenter" with the only directly accessed field being a global field used to allow employees to choose there name from a drop-down listing the names of all employees.  Once the name has been chosen a relationship between TO "Assignments_EmployeeCenter" and (matching Name) TO "Assignments" and then (matching Task ID) TO "Tasks", aided by a script trigger for other filter/processing creates the listing of tasks for that employee in a portal.  From here the employee has a pop-up in each row of the portal next to each task for which they have an assignment that shows whether the employee is Active/Inactive/Complete on each of those tasks.  They can then select to change that status from that pop-up.


      The record locking message comes at this point, when an employee attempts to change a status. This has been difficult to troubleshoot since these ppl are scattered across two locations and widely around the plant and tend to be very busy, there and then gone.  I have managed to catch it happening close by at one time and discovered that the person was not affecting any of the records having to do with my own. I have also been able to attempt to step through the activated script when this happens and the script never even gets to run before the message comes up.  Oddly enough, switching from one record to the next on the main layout (TO "Assignments_EmployeeCenter"), even though it has no effect on the records displayed and accesses only a single global field, causes the problem to no longer happen.


      Does anyone have any idea of what is happening here?

        • 1. Re: Record locking problem

          I don't know if this is true for current versions, but it used to be that locking a record in a portal locks the parent record also. Could that explain what you are experiencing?

          • 2. Re: Record locking problem

            I have struggled with this (and it is a problem prior to ver 10 as well).


            Basically, although globals are user specific, it still locks the record. This means in a multi-user environment, users will step on each others toes if you try to use the same parent record for all of them (even if the only info in the record is global).


            I have gotten around this by creating a new record for each person that navigates to the layout and deleting the record out when they are done. This is not a perfect solution, but it works.


            (This is one of those problems that can make you crazy, it will never occur in a single user/developer environment, ever)

            • 3. Re: Record locking problem

              Thank you very much, both of you.


              I had wondered about that possibility but it just didn't seem to be a ... possibility. :-/


              Now, at least I have some ideas of how to get around it.  Since it will be some time before I can get around to implementing an attempt at this solution, and because it explains much of the mystery and makes sense to me, I will go ahead and mark this as the "Accepted Solution".


              Thanks again

              • 4. Re: Record locking problem

                Hmmm, what if you had a found set of zero records?


                Then there's no record to lock. You can still edit a global field with zero records present so you could omit all records from your found set, present the layout and then your script trigger brings up a record when they exit the field...

                • 5. Re: Record locking problem

                  That definitely sounds like an excellent suggest, Phil.  :)  I will print this thread out for reference and give that a try! It will cost a great deal less time to try than some of the other notions I was considering.

                  • 6. Re: Record locking problem

                    I went ahead and tested your suggestion, Phil.  I decided to create a separate table with only the one global field and no records in it to use as the layout's TO.  It works.  It is a bit slow but I will have to reorganize the underlying relationships better than I have them for testing purposes.  Honestly, this is how it should have been done from the start rather than putting the global in a table that would eventually house hundreds of thousands of records.  lol