Hello I have customized the default function "Mass update of Child Contacts" to copy some fields from Parent Module Leads to child Module Message. We have an structure where one Lead (Email, type) may have many messages, one per (email,Type) combination is contacting us.
I am trying to move some details from Lead to the message, so we can generate some automation based on those fields.
rec = zoho.crm.getRecordById("Leads",accId);
resp = zoho.crm.getRelatedRecords("Messages","Leads",accId,1);
for each ele in resp
{
mp = Map();
mp.put("Region",ifnull(rec.get("Region"),""));
mp.put("Email",ifnull(rec.get("Email"),""));
mp.put("Status",ifnull(rec.get("Status"),""));
mp.put("Lead Owner",ifnull(rec.get("Message Owner"),""));
mp.put("Source System",ifnull(rec.get("Source System"),""));
mp.put("Sales Manager",ifnull(rec.get("Sales Manger"),""));
updateResp = zoho.crm.updateRecord("Messages",ele.get("CustomModule5 Id"),mp);
info updateResp;
}
}
Sorry, maybe it is a simple issue but I am not a developer and not capable to short it out.
Thank you very much for your help
Regards