I am using a Custom Button to create a note on a lead. I want the user who clicks the button to be the "Created By" on the Note. This is not working. No matter who clicks the button, It shows my ID and name.
desc = "Outreach Action:" + "\n" + "Left a voicemail" + "\n" + "Sent an email" + "\n" + "Spoke with lead";
notemap = Map();
notemap.put("Parent_Id",leadId);
notemap.put("Note_Content",desc);
notemap.put("Note_Title","Lead Outreach");
notemap.put("se_module","Leads");
notecreate = zoho.crm.createRecord("Notes",notemap);
info notemap;
info notecreate;
return "Notes added Successfully";
I tried changing as follows to have It put In the Created By Information - still doesn't work:
desc = "Outreach Action:" + "\n" + "Left a voicemail" + "\n" + "Sent an email" + "\n" + "Spoke with lead";
notemap = Map();
notemap.put("Parent_Id",leadId);
notemap.put("Created_By",UserId);
notemap.put("Created_By_Name",UserFirstName + " " + UserLastName);
notemap.put("Note_Content",desc);
notemap.put("Note_Title","Lead Outreach");
notemap.put("se_module","Leads");
notecreate = zoho.crm.createRecord("Notes",notemap);
info notemap;
info notecreate;
return "Notes added Successfully";
I define leadId, UserId, UserFirstName, and UserLastName In Edit Arguments
Any advice?
Note: I originally got help In another thread that seems to have disappeared, so I'm sorry that I can't give code credit appropriately.