Announcement

Collapse
No announcement yet.

Change of assigned user for all records assigned to a project, many entities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change of assigned user for all records assigned to a project, many entities

    Espo Version: 6.0.8
    Advanced Pack 2.6.5

    Hello!

    I have built a custom system on EspoCRM and am just starting with data migration from the legacy system.

    The system has a filter for projects (sub entites of account). The users are assigned to projects. There are up to 30 subentites to projects, where the assigned user creates records.

    Nobody but the user and the admin should be able to edit these records.

    When the user gets changed (for example previous user retired) and the new user gets assigned to the projects:

    How to give the new user the right to edit the records of the previous user?

    My solution was:
    Create a team, same name as the project. Both users (retired and new) are team members. But the records are not assigned to the team. And it is many records in up to 30 entities.

    What is the way to go?

    Thank you!


  • #2
    Hello,
    If a user has access to record with the scope 'own' (Role) then he should have access to a record he is assigned. Is this behaviour doesn't work for you?

    Comment


    • #3
      Hi Maximus!

      This behaviour works perfect, as long as this user is employee of our company. As soon as he gets retired, there will be a new user who needs access to the record.

      How do I get the new user assigned to records he did not create. And it is many existing records, he needs to get assigned to.

      How to automate that? Thats my issue.

      Thank you!

      Comment


      • #4
        Are you deleting the retired users? If so then you can try to build a logic like this one.
        1. Create a workflow for the Account entity with the 'Sequential' trigger type. Add a few actions:
        1.1. Action: Use the Assignment rule.
        1.2. Action: Update Related Record -> e.g. Products -> Use formula like: assignedUserId = account.assignedUserIdassignedUserId;
        2. Create a BPM -> Target entity (User)
        2.1. Signal Start Event (@deleted)
        2.2. Task -> Action: Trigger Another Workflow Rule (workflow from the first step)

        Didn't test it but I believe it should work.

        Comment


        • #5
          Hi Maximus!

          This might be a way to go! I am not yet able to test it. I am not sure if deleting the retired user is possible. But I will report back when getting to the point of testing.

          Thank you!

          Comment


          • #6
            If you are not deleting the retired user but setting it as Inactive, then you just need to use the Conditional Start Event in your BPM instead of Signal Start Event.

            Comment


            • #7
              This is good information! Just found out that I must not delete the previous user, as there are entities which need to show him also later on. Such as worksheet entity. Once it is created and signed, nobody should change it.

              Thnak you!

              Comment


              • #8
                Hi gustavgraz ,

                How to give the new user the right to edit the records of the previous user? - Create Access Roles to Teams and add relevant users to those teams.

                of you can mass update relevant roles to new users

                When you are changing retied user to new user if needed change the team as well if you are using new team.


                What I do with these kind of things, I'm keeping the retired user inactive and changing assign user from the record. So we can see record created by retired user but now it handling by new user and from the stream you can see when the assign user changed or you can add hidden filed to capture assign user change date.
                Cheers!
                Nishan.

                Comment

                Working...
                X