1 Reply Latest reply on Jun 16, 2016 2:00 PM by florian1

    Lock Change-record when it´s allready in Progress

    Apprentice

      Hi everybody,

       

      is it possible to lock a Change-Record which is allready in Progress by an other User?

      Now the situation is as following:

      New Change recieved -> User A is opening the Change and work on it -> meanwhile User B opens the same Change-Record too and works on it -> User A saves and User B will get a message if User B want to save the Record.

       

      Is there a way to lock the Record for other User, if one User opens the Record?

       

      Thanks in advance

      Florian

        • 1. Re: Lock Change-record when it´s allready in Progress
          florian1 Expert

          Hi Florian,

           

          haven't tried it yet but you can start with the following and think through:

          - Add a field to Change: LockedBy (validated)

          - Add a CalculationRule (with recalculate on load): LockedBy_Valid = $(nvl(LockedBy_Valid,CurrentUserRecId())

          - Add an Validation rule: $(IsNull(LockedBy_Valid) || CurrentUserRecId() = LockedBy_Valid || CurrentUserLoginId() = "InternalServices")

           

          Make sure that LockedBy will be set to null after saving the record.

          You will still have to figure out what to do in case the person locking the record doesn't do anything.

          - e.g. add a second field LockedDateTime and only lock the record for 5 minutes..

           

          Cheers,

          Florian