English
bom.parseAddBomData.after
About 160 wordsLess than 1 minute
2026-05-08
Execution Timing
After data is added and the BOM plugin logic has run, with child items already added to the detail object data
Parameters
| Parameter | Description | Type |
|---|---|---|
| allAddData | List of all added data | Array |
| mdApiName | Metadata API name | String |
| param | Other parameter object | Object |
Return Result
| Parameter | Description | Type |
|---|---|---|
| None |
Notes
- This hook is triggered after the main BOM plugin logic has finished and can be used to post-process the added data.
- Data can be formatted, supplemented, or transformed in this hook.
Code Example
export default class Plugin {
apply() {
return [{
event: "bom.parseAddBomData.after",
functional: this.parseAddBomDataAfter.bind(this)
},
];
}
async parseAddBomDataAfter(context){
let { allAddData, mdApiName, param } = context;
// Post-process the added data
if(allAddData && allAddData.length > 0) {
allAddData = this.processBomData(allAddData, mdApiName);
}
}
processBomData(dataList, mdApiName) {
// Logic for processing BOM data
return dataList.map(item => {
// Apply different processing based on the metadata API type
if(mdApiName === "bom_item") {
return {
...item,
processed: true,
processTime: new Date().toISOString()
};
}
return item;
});
}
}