Hello. I want a field which is updated by a custom function to trigger a workflow. I've read that I should include {"trigger" : ["workflow"]}) into the function. Where should I put this line the following function? Should it be placed at the last line?
BedrijfDetails = zoho.crm.getRecordById("Accounts",BedrijfId);
info BedrijfDetails;
mp = Map();
mp.put("Verwachte_weekomzet",BedrijfDetails.get("Verwachte_omzet_per_week_korte_termijn"));
if(!isnull(InschrId))
{
updateResp = zoho.crm.updateRecord("Registrations",InschrId,mp);
info mp;
info updateResp;
}
else
{
for each rec in zoho.crm.getRelatedRecords("Inschrijving_bedrijf","Accounts",BedrijfId)
{
update_related_inschrijvingen = zoho.crm.updateRecord("Registrations",rec.get("id"),mp);
update_bedrijf = zoho.crm.updateRecord("Accounts",BedrijfId,{"Inschrijving":rec.get("id")});
}
}