Fix Script: Update Layout all Leads

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.

  1. Leads_With_Standard_Layout = zoho.crm.getRecords("Leads with Standard Layout");

  2. for each lead in Leads_With_Standard_Layout {
  3. lead.put("Layout","Drivebys");

  4. update_resp = zoho.crm.updateRecord("Leads",lead.get("LEADID"),lead);
  5. info (update_resp);
  6. }