Fix Script: Update Layout all Leads
I'm trying to update ALL leads that have a "Layout" value of "Standard" using this script to value of "Drivebys". My script executes properly but nothing happens to the records. Any idea why? I have already confirmed the view name is correct, the field values are also.
- Leads_With_Standard_Layout = zoho.crm.getRecords("Leads with Standard Layout");
- for each lead in Leads_With_Standard_Layout {
- lead.put("Layout","Drivebys");
- update_resp = zoho.crm.updateRecord("Leads",lead.get("LEADID"),lead);
- info (update_resp);
-
- }