據我了解,InstantiateTemplateRequest返回具有“主題”和“描述”屬性的實體集合,但是我見過的大多數示例都將集合視為只包含一個值。有沒有可以返回多個值的情況?
1 回答

鴻蒙傳說
TA貢獻1865條經驗 獲得超7個贊
不,文檔說:
InstantiateTemplateRequest 類
包含從模板(電子郵件模板)創建電子郵件所需的參數。
因此打算在響應實體集合中接收單個實體。
例如,這篇博客也通過假設只有一個實體來解釋這種行為。由于您要傳遞templateId, contactId- 這將根據該模板和聯系人記錄數據生成一封電子郵件。
InstantiateTemplateRequest instTemplateReq = new InstantiateTemplateRequest
{
TemplateId = templateId,
ObjectId = contactId,
ObjectType = "contact"
};
InstantiateTemplateResponse instTemplateResp = (InstantiateTemplateResponse)service.Execute(instTemplateReq);
Entity template = instTemplateResp.EntityCollection.Entities[0];
- 1 回答
- 0 關注
- 112 瀏覽
添加回答
舉報
0/150
提交
取消