i linked a field in deals with vendors through list, i need a field in deals to lookup that chosen and get the result with email from vendor.
i wrote the hereunder script but error Value is empty and 'getJSON' function cannot be applied
Line Number:4, can anyone help.
deal_record = zoho.crm.getRecordById("Deals",deal_id);
vendor_id = deal_record.get("Developer_2").getJSON("id");
response = invokeurl
[
url :"https://www.zohoapis.com/crm/v2/vendors/" + vendor_id
type :GET
connection:"crm_con"
];
vendor_data = response.get("vendors");
info vendor_data;
vendor_email = vendor_data.get("email");
update_map = {"DEmail":vendor_email};
update_resp = zoho.crm.updateRecord("Deals",deal_id,update_map);
info update_resp;