Add Job for different Owner than yourself
I am trying to enable users to create Jobs in the name of other users not just Asignees but actual Owners so that they will be able to change the status of the Job. Usually if a user is an Assignee for a Job he can not change the status of that Job unless he is the one creating it (the Owner too). Our manager has to add a lot of Jobs for employees and each of the employees must have the capability to change the status. Is there any way we can accomplish this?
I have tried the following code:
get_record = zoho.people.getRecordByID("P_TimesheetJob",job_id);
updaterecord = Map();
updaterecord.put("JobOwner",new_owner);
updaterecord.put("recordid",job_id);
record = zoho.people.update("P_TimesheetJob",updaterecord);
get_record_new = zoho.people.getRecordByID("P_TimesheetJob",job_id);
info record;
info get_record_new;
With the params:
new_owner = ID (Owner) - a newly created lookup field that lets the user choose the owner
job_id = ID - the actual ID of the targeted job
It gives this messages (info) when I Save and Execute:
{"result":"{\"pkId\":\"3815000000044447\",\"message\":\"Successfully Updated\"}"}
And the second info gives me the right information for owner:
{..............,"JobOwner.ID":"3815000000039005",....."JobOwner":"Careers",...........................}
But this does not actually change the Owner in the system. can you please help me?
Thank you,
Adrian
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Meet the Zoho People experts in your city!
Dear users, We are delighted to invite you to the Zoho People's user community meetup. We are stoked to visit our users in their cities and help them with all things Zoho People. Join us for a day of insightful Zoho sessions, interactions with other
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.