# FxUI.objectApi.fetch_email_templates(apiName)

This method allows you to get a list of mail templates.

# parameter

parameter illustrate type Optional value Default value
apiName Business object apiName (do not pass the default query for all objects) string

# usage

The method returns a Promise Object , an example of which is as follows:

FxUI.objectApi.fetch_email_templates('AccountObj').then((data) => {
    console.log(data);
    // todo what you want
}).catch(err => {
    console.log(err);
})

# Template data structure

List is the obtained email template list data.

{
    "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": "客户",
            "name": "客户打印模板",
            "version": 1,
            "creator": "系统",
            "modifier": "系统",
            "creatorId": "-10000",
            "modifierId": "1033",
            "createTime": 1532080288825,
            "modifyTime": 1572263703545
        }
    ]
}
lastUpdate: 10/21/2022, 5:22:27 PM