contactIDstr = contactID.toString();
contactDetails = zoho.crm.getRecordById("Contacts",contactID.toString());
dealinfo = {
"Layout":{"name": "Money Mailer Deals Layout", "id":"2384530000050829019"},
"Deal_Name":contactDetails.get("Account_Name").get("name"),
"Company_Name":contactDetails.get("Account_Name").get("name"),
"Contact_Name":contactDetails.get("Contact_Name"),
"Owner":contactDetails.get("Owner"),
"Franchisee":contactDetails.get("Original_Company"),
"Franchisee ID":contactDetails.get("Franchisee_ID"),
"Franchisee Owner":contactDetails.get("Franchisee_Owner"),
"Closing_Date":zoho.currentdate,
"Sales_Division":"Money Mailer",
"Stage":"Quality Check",
"Source":"Money Mailer appt"
};
info dealinfo;
response = zoho.crm.createRecord("Deals",dealinfo);
return response;
It works until I add in the layout as the first component of dealinfo. Once I add the layout part I get this error:
{"code":"MANDATORY_NOT_FOUND","details":{"api_name":"Account_Name"},"message":"required field not found","status":"error"}
If anyone knows of any solutions or suggestions please let me know
Thanks