Dear Zoho Community,
I created a custom button simular to the 'Convert' button in the Leads module, that converts a Lead into an Account and a Contact. My button does it for two custom modules (record from Module A is moved to Module B) and it works well.
In addition, I wanted to move the Notes that this record has in its initial Module (Module A) to the new (identical) record created in Module B. This works as well. The (part of) code I used for the transfering of notes is the following:
KundeCreate = zoho.crm.createRecord("Kunden_test",KundeMap);
newacctId = KundeCreate.get("id").toLong();
//get address of new kunde
RelNotes = zoho.crm.getRelatedRecords("Notes","Eigent_mer_Test",eigId.toLong());
//gets the notes of the eigentuemer contact
countVal = 0;
for each ele in RelNotes
countVal = countVal + 1;
notemap = Map();
notecreate = zoho.crm.createRecord("Notes",notemap);
As you might derive from the code, my module A is called "Eigent_mer_Test" while my module B is called "Kunden_test".
I have a slight problem however:
While the notes, their contents and their titles are copied succesfully, the time at which the note is created, as well as the creator of the note are not transferred properly. In the new notes, the name of the Super Admin is shown as the creator of the note (which is wrong) and it looks as if the note is created at this time. To make a picture out of this description, take a look at the screenshots I sent with my post:
Screenshot 191 shows the original notes with the correct time and creator, while Screenshot 192 shows the 'converted' notes, with the wrong name and time.
I have considered adding lines to my code looking like:
but it doesn't work.
Can somebody with experience in this help me out?