id = service_appointment.get("id"); contactId = service_appointment.get("Contact").get("id"); contactResp = zoho.fsm.getRecordById("Contacts",contactId); email = contactResp.get("data").toMap().get("Email"); related_resp = zoho.fsm.getRelatedRecords("Notes","Service_Appointments",id); if(related_resp.isEmpty()) { info "No notes added !!!"; }else { related_resp_list = related_resp.get("data").toList(); for each each_related_resp in related_resp_list { each_related_resp_map = each_related_resp.toMap(); attachmentsResp = each_related_resp_map.get("$attachments"); if(attachmentsResp.isNull()){ info "No attachment present in the Note !!!"; }else{ attachments_list = each_related_resp_map.get("$attachments").toList(); for each attachment in attachments_list { file_id = attachment.get("$file_id"); fileResp = invokeurl [ url :"https://fsm.zoho.com/fsm/v1/files?file_id=" + file_id type :GET connection:"zfsm" ]; sendmail [ from :zoho.adminuserid to :email subject :"Zoho FSM Notes Attachments" message :"Please find attached the files in service appointment Notes." Attachments :file:fileResp ] } } } } |
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.