English
Common Parameters
About 194 wordsLess than 1 minute
2025-12-16
The common parameters of the Object Detail plugin are described below.
An Object Detail hook's functional callback receives context and plugin, in that order. Event-specific parameters are merged directly into the top level of context; refer to the corresponding event document for their fields.
| Parameter | Description | Type |
|---|---|---|
| context | Detail plugin context containing common and event-specific parameters | Object |
| plugin | Current plugin runtime information; business logic normally does not need it | Object |
| context.objectApiName | API name of the current detail object | String |
| context.objectDataId | Data ID of the current detail object | String |
| context.bizApi | Detail business operation methods; see bizApi | Object |
| context.dataGetter | Data access API; see dataGetter. It is currently a callable function with API methods attached | Function |
Notes
1. Check the type of dataGetter before using it
The early dataGetter design did not follow the current convention. At runtime it is a callable function with API methods attached. Use the following type check for compatibility with future normalization:
export default class Plugin {
apply() {
return [{
event: 'detail.render.before',
functional: this.renderBefore.bind(this)
}];
}
renderBefore(context, plugin) {
let { dataGetter } = context;
if (typeof dataGetter === 'function') {
dataGetter = dataGetter();
}
dataGetter.getDescribe();
}
}