a = zoho.crm.getRelatedRecords("relatedlist","Cases",id);
for each resp in a
{
Dispatchlist_id = resp.get("id").toString();
//获取表单ID
//Listofattachments:获取附件列表数据
Listofattachments = invokeurl
[
type :GET
connection:"xycblueprints"
];
//循环附件数据
for each fileid_fault in Listofattachments.getJSON("data")
{
fileid_id = fileid_fault.get("id");
//附件ID
file_name = fileid_fault.get("File_Name");
//附件名称
//response:下载附件数据
response = invokeurl
[
type :GET
connection:"xycblueprints"
];
response.setFileName("" + file_name + "");
//不加这一步附件名称将是乱码,加上即可正常显示名称。
resp = zoho.crm.attachFile("Cases",id,response);
//更新到对应模块
}
}