I have been trying to create a function linked to a Workflow, that will when a Potential is created from the Account module the function will auto fill in the form. I have looked on the forum and found some code but I am unable to get it working.
In the editor it executes OK and the ouput in the function editor contains no erorrs. Any advice would be appricated.
accountID = accId.toLong();
accDetail = zoho.crm.getRecordById("Accounts",accountID);
mp = Map();
mp.put("Deal_Name",accDetail.get("Account_Name"));
mp.put("Company_Name",accDetail.get("Company_Name"));
mp.put("Address_1",accDetail.get("Address_1"));
mp.put("Address_2",accDetail.get("Address_2"));
mp.put("Address_3",accDetail.get("Address_3"));
mp.put("Town",accDetail.get("Town"));
mp.put("Zip_Code",accDetail.get("Zip_Code"));
PotentialCreate = zoho.crm.createRecord("Potentials",mp);
info mp;
info PotentialCreate;
newpotid = PotentialCreate.get("id");
info PotentialCreate.get("id");
Craig.