简体中文
related.render.before
约 175 字小于 1 分钟
2025-09-22
相关对象渲染前事件。可用于拦截和处理相关对象的业务类型、数据等。
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| objApiName | 当前相关对象apiName | String |
| record_list | 当前相关对象的业务类型列表 | Array |
返回结果
| 参数 | 说明 | 类型 |
|---|---|---|
| handleRecordTypes | 处理相关对象业务类型的方法 | Function |
基础示例
过滤相关对象的业务类型
{
event: "related.render.before",
functional: function (pluginExecResult, options) {
return {
handleRecordTypes(opt){
// opt.record_list: 当前相关对象的业务类型列表
// 只保留业务类型为"default__c"的类型
opt.record_list = opt.record_list.filter(it=>it.api_name==="default__c")
return opt;
}
}
}
}注意
- 可通过handleRecordTypes方法自定义业务类型的过滤、排序等逻辑。
