how to reassign records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahilar12
    New Member
    • Feb 2009
    • 27

    how to reassign records

    hi all

    can anybody tell me the logic or the code how to reassign some records from one user to another user
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    You need to give more details than that.

    Comment

    • ahilar12
      New Member
      • Feb 2009
      • 27

      #3
      reply for reassigning records

      hi r035198x,


      Say for example u have an user admin and another user ahila.u have some modules like accounts,contac ts,leads etc where u have some records.
      i want to reassign a particular module(with all the records included) from one user to another user and get updated.

      thanks in advance

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Then it would depend on the table structures you have but ultimately all you would do is run an update statement that changes the user_id to the new value.

        Having said that, it all sounds very inappropriate. Why would you want reassign those records to another user? Why not rename the user who owns the records to the new user. You do less work that way.

        Comment

        • ahilar12
          New Member
          • Feb 2009
          • 27

          #5
          reply to reassign record

          hi r035198x,

          actually i m trying out a module myaccount in sugarcrm where u have an option for reassigning records.There u can reassign the records of one particular module to another user.

          This is done in the case where an employee quits the job, or not in the position to complete the job.Then the work(records) is assigned to some other user(employee) or a team member.

          Able to get it.
          And for u r kind info i m not that much sound in php and mysql (at the beginner level).
          This is a task i m trying out for myproject work .

          kindly get me an idea on how to go about it

          thanks in advance

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Doesn't sound like a good design. This is what roles should be used for. The work records should be modifiable by someone in a particular role not just by a specific individual.
            When an employee quits, just create a new employee, give him the same role as the old guy and the work proceeds as normal.
            That way the system is more informative and more flexible. You can determine who did which part of the work.

            Comment

            • ahilar12
              New Member
              • Feb 2009
              • 27

              #7
              reply to reassign records

              oh ok

              i will try out that in that manner

              thanks r035198x

              Comment

              Working...