We have renamed our "contacts" and "accounts" modules. For the ease of explanation, let's say contacts is now "moduleA" and accounts is "moduleB".
I want to map certain fields (First Name, Last Name, Lead Status, Contact Number, etc) from moduleA to moduleB using a custom "convert" button that applies a "custom funciton".
NOTE: moduleAId is a parameter of the function chosen from the list as: moduleA id
moduleAIdLong = moduleAId.toLong();
rec = zoho.crm.getRecordById("moduleA",contactedIdLong);
mp = Map();
mp.put("Pending Contract Name","Testing");
mp.put("Lead Stage",ifnull(rec.get("Lead Status"),""));
mp.put("Qualification Status",ifnull(rec.get("Qualified Status"),""));
mp.put("First Name",ifnull(rec.get("First Name"),""));
mp.put("Last Name",ifnull(rec.get("Last Name"),""));
pendingCreate = zoho.crm.createRecord("moduleB",mp);
return "Success";
However, whenever I click this button/run this code...no record is created in moduleB with the desired information. What do I need to change/add to my code to get this functionality working?