English
fetch_email_templates
About 133 wordsLess than 1 minute
2025-12-16
This method allows you to get the list of email templates.
Syntax: fetch_email_templates(apiName)
Parameters
| Parameter | Description | Type | Allowed Values | Default |
|---|---|---|---|---|
| apiName | Business object apiName (if omitted, all objects are queried) | string | — | — |
Example
This method returns a Promise, as shown below:
FxUI.objectApi.fetch_email_templates('AccountObj').then((data) => {
console.log(data);
// todo what you want
}).catch(err => {
console.log(err);
})Return Value
Below is the returned data. list contains the email template records.
{
"pageNumber": 1,
"pageSize": 20,
"pageCount": 1,
"totalCount": 1,
"list": [
{
"type": 0,
"isDefault": true,
"header": "",
"footer": "",
"waterMark": "{}",
"isToWord": 0,
"isPrintApproval": 0,
"headMargin": 0,
"footMargin": 0,
"id": "5b51b0a0319d19b74dcb46e5",
"tenantId": "74114",
"appId": "crm-printtemplate",
"templateId": "5cef94dfa5083d09dd957955",
"objDescApiName": "AccountObj",
"objDescApiText": "Customer",
"name": "Customer Print Template",
"version": 1,
"creator": "System",
"modifier": "System",
"creatorId": "-10000",
"modifierId": "1033",
"createTime": 1532080288825,
"modifyTime": 1572263703545
}
]
}