Hello,
We have a function that uses a deluge task to search Zoho Desk for a particular contact. This function fails whenever triggered by the workflow and/or blueprint (we've tried both), but when we manually run the same record ID through the function it works every time. In an ideal scenario, we'd like to search Desk by the zohoCRMContact field, but we understand that this isn't a valid query parameter. It appears that when we search by fullname it's a wild card search. We think it's timing out when triggered, whereas when manually run it allows enough time. Otherwise, we can't explain the difference. Here is the code:
pfSearchValue = {"fullName":contFullName};
pfDeskSearch = zoho.desk.searchRecords(orgId,"contacts",pfSearchValue);
Instead of returning the match, which is exact since we're syncing from Zoho CRM to Zoho Desk, it returns all contacts. We then search through all results to find the matching one, but again must be timing out? Here is that code:
searchResultsList = searchResults.toJSONList();
for each result in searchResultsList
{
info "Looping through desk results in";
info "------ Next Result ------";
// info result;
dContactId = result.get("id");
resultCrmMap = result.get("zohoCRMContact");
if(resultCrmMap != null)
{
resultCrmId = resultCrmMap.get("id");
if(resultCrmId = oppContactId)
{
fullResult = result;
info "Matching Result: " + fullResult;
matchingCrmId = resultCrmId;
matchingDeskId = dContactId;
info "Matching CRM Contact: " + matchingCrmId;
info "Matching Desk Contact: " + matchingDeskId;
}
}
}
Thanks for the help!