14 Replies Latest reply on Jan 19, 2017 7:29 AM by BruceRobertson

    Best Approaches to Record Locking

    maestrodevelopment

      We are looking for some best practices on how to handle record locking on FM Server.  Our solution involves multiple tables and layouts.  On each layout we have multiple tabs where users can enter data.  Once the user accesses a record, we want to lock it until he is finished with it.  Finished means (1) leaving the record or (2) viewing a list of all the records in the table or (3) branching to another related record.  If we set the layout to NOT committing the record (Layout Setup > Save record changes automatically = UNchecked) then every time a person goes to another tab on the SAME record, the message pops up asking to save changes or not.  Annoying.  If we do Check to 'Save record changes automatically' on the layout, then we have to do the record locking stuff by going to the record and using script step to execute 'Open record'.  But here is where it does not work.  User A is on record 1 in field and this locks the record.  User B tries record 1 and it is locked.  Good.  Then user A goes to another tab on the layout but has not selected a field yet.  He might click outside a field (yep users to do that!).  User B jumps in and can edit the record.  Not good.  User A then selects a field and the record is now locked to him.  Not good.  We want to lock the record until the locking user exits the record and commit it to the database at that time.  Any suggestions to do this gracefully?