Change ownership of record automatically
Posted: 2013-01-18 20:17
Here is one thing I am currently working on.
Preamble:
Supervisors enter reports based upon their evaluation of an member. This report needs to then be looked at by the individual. It is important the only one who can see reports are the individual who they are about and the supervisors who create the reports. The supervisors ability to view is easy - give their group permission to see all records. The other item involves changing ownership of the record to the person who was supervised.
Intent:
When the report is saved the user name is looked at and then an email is sent to this member advising them the report has been filed. What I am trying to get to happen is to have the ownership of the record changed to the member name who the report is about. The current system requires the admin to change ownership of the record.
Task:
I am writing code so when the report is filed and saved, the email is sent out and the program automatically changes the ownership of the record from the person who created it to the person who it is about. This is done using already saved information about the person who the report is concerning. This has to be a behind the scenes change so the supervisor does not have to do anything. (It was hard enough to get all of them to use the online system)
Is anyone else working on such a beast? Is there any interest in my posting my solution when done? Have it partly working but not fully yet. Changes the record ownership only about 15% of the time and not sure why (yet). But my code is still at the cheap and dirty stage right now.
Alan
Preamble:
Supervisors enter reports based upon their evaluation of an member. This report needs to then be looked at by the individual. It is important the only one who can see reports are the individual who they are about and the supervisors who create the reports. The supervisors ability to view is easy - give their group permission to see all records. The other item involves changing ownership of the record to the person who was supervised.
Intent:
When the report is saved the user name is looked at and then an email is sent to this member advising them the report has been filed. What I am trying to get to happen is to have the ownership of the record changed to the member name who the report is about. The current system requires the admin to change ownership of the record.
Task:
I am writing code so when the report is filed and saved, the email is sent out and the program automatically changes the ownership of the record from the person who created it to the person who it is about. This is done using already saved information about the person who the report is concerning. This has to be a behind the scenes change so the supervisor does not have to do anything. (It was hard enough to get all of them to use the online system)
Is anyone else working on such a beast? Is there any interest in my posting my solution when done? Have it partly working but not fully yet. Changes the record ownership only about 15% of the time and not sure why (yet). But my code is still at the cheap and dirty stage right now.
Alan