Hi all,
I'm struggling with two custom functions.
One is working (in a workflow)
The other one isn't (inside another workflow)
The only difference between the two is the field they should update. I can't seem to figure out what is the problem.
See the codes:
Not working:
- rec = zoho.crm.getRecordById("Accounts",accId);
- resp = zoho.crm.getRelatedRecords("Contacts","Accounts",accId,1);
- for each ele in resp
- {
- mp = Map();
- mp.put("con_modules",ifnull(rec.get("ac_modules"),""));
- updateResp = zoho.crm.updateRecord("Contacts",ele.get("id"),mp);
- info updateResp;
- }
Working:
- rec = zoho.crm.getRecordById("Accounts",accId);
- resp = zoho.crm.getRelatedRecords("Contacts","Accounts",accId,1);
- for each ele in resp
- {
- mp = Map();
- mp.put("con_type",ifnull(rec.get("ac_soort"),""));
- updateResp = zoho.crm.updateRecord("Contacts",ele.get("id"),mp);
- info updateResp;
- }
When I disable the working function (and workflow), the other one still doesn't work...so I have no idea what's next. I also changed the API syntax for both fields. So that wasn't the problem either.
I'm out of idea's. Can anyone help?
Many thanks.
KR, Iris