5 Replies Latest reply on Aug 18, 2016 12:48 PM by florian1

    Restrict statuses to Owner

    stapletj@tbh.net Apprentice

      In our workflow, only the problem record owner should be allowed to change the status to "Resolved", "Closed", or "Cancelled".

      Right now, any technician can resolve a problem record.

       

      Any advice on where to lock that down?

        • 1. Re: Restrict statuses to Owner
          florian1 Expert

          Hi Jay,

           

          give this a try:

          AND Current Status NOT equal to: $(if [ValidationList]Owner_Valid != CurrentUserRecId() then "Closed" else "")

          AND Current Status NOT equal to: $(if [ValidationList]Owner_Valid != CurrentUserRecId() then "Resolved" else "")

          AND Current Status NOT equal to: $(if [ValidationList]Owner_Valid != CurrentUserRecId() then "Cancelled" else "")

           

          Please be careful when using this condition as this status validation also takes place in automated actions (e.g. Workflows, Triggered Actions).

          I haven't tried to use an "not in list" condition yet. This might work as well.

           

           

          Cheers,

          Florian

          • 2. Re: Restrict statuses to Owner
            florian1 Expert

            Two other ways I can think of:

            1) create a ReadOnly rule on form level

            2) create a ReadOnly business rule

            with similar conditions.

            1 of 1 people found this helpful
            • 3. Re: Restrict statuses to Owner
              stapletj@tbh.net Apprentice

              I got an error saying that I can't change the ReadOnly  status, since it's set by the BO. So I put the conditional in to the Visible Rule on the Resolution box. This way, at least if someone tries to set the status to Resolved, it will error out saying the Resolution can't be blank.

               

              I changed the label to explain that it's for Problem Managers only.

              • 4. Re: Restrict statuses to Owner
                TDougl Apprentice

                Hi Jay,

                This sounds like a good use case for a Validation Rule.

                 

                 

                $(Status not in ("Resolved",  "Closed",  "Cancelled") ||

                  CurrentUserRole() in ("Admin",  "ServiceDeskManager") ||

                  CurrentLoginId() == Owner)

                 

                I would allow access for the Admin role (think Internal Services), as well as perhaps a Manager/Supervisor role in case of absence, illness, etc. In this example I use the Service Desk Manager role. You could of course make the expression more complex and lookup the Manager from the Employee record and allow that specific user too (but I leave that as an exercise for the reader :-) ).

                 

                When logged in as Service Desk Analyst, trying to set the Status of an Active Problem record to Resolved gives the expected Message:

                 

                 

                Hope this helps!

                1 of 1 people found this helpful
                • 5. Re: Restrict statuses to Owner
                  florian1 Expert

                  I don't like to have a validation rule taking place after the user has submitted an action.

                  He shouldn't even have the possibility to do this. This is a bit misleading.

                   

                  I have to admit that my first answer wasn't that good.

                  But a Read-Only rule on form level (or bo level) should be just fine.