Custom function on mass action button always updates fields in Blank
Hi! I developed a simple custom function that updates some fields.
I placed it on the "list View - Mass action menu" in order to execute to simultaneously to multiple entities.
When I execute it selecting a single entity, it works correctly, but if i select 2 entities or more, it updates the fields always in blank. The script does not return an error, just ends and fills the requested fields in blank.
Its really strange since it works if i only select one entity. Thanks for your help
idList = id.toList("|||");
for each id in idList
{
numero_dias = daysBetween(fecha_apertura,fecha_cierre);
datos = Map();
datos.put("Numero_de_dias_abierto",numero_dias);
actualiza = zoho.crm.updateRecord("nuvify",id,datos);
}
return "ok";