English
related.render.before
About 126 wordsLess than 1 minute
2025-09-22
Event before rendering a related object. It can be used to intercept and process the related object's record types, data, and similar information.
Parameters
| Parameter | Description | Type |
|---|---|---|
| objApiName | Current related object apiName | String |
| record_list | Current list of record types for the related object | Array |
Return Value
| Parameter | Description | Type |
|---|---|---|
| handleRecordTypes | Method for processing related object record types | Function |
Basic Example
Filter record types of the related object.
{
event: "related.render.before",
functional: function (pluginExecResult, options) {
return {
handleRecordTypes(opt){
// opt.record_list: current list of record types of the related object
// retain only the record type whose api_name is "default__c"
opt.record_list = opt.record_list.filter(it=>it.api_name==="default__c")
return opt;
}
}
}
}Notes
- You can customize filtering, sorting, and other record-type logic through
handleRecordTypes.
