Customize admin panel data display with hardcoded data

I have a content type product. It has the fields name, description. I did add lifecycle hook afterFindMany to return the hardcoded data as below

// src/api/company-or-product/content-types/company-or-product/lifecycles.ts

export default {
async afterFindMany(event) {
const hardcodedData = [
{
companyOrProductId: ‘1’,
companyOrProductName: ‘Company 1’,
},
{
companyOrProductId: ‘2’,
companyOrProductName: ‘Company 2’,
},
// Add more data as needed
];

    event.result = hardcodedData;
    console.log('afterFindMany', event);
},

};

Above console log is printed but GUI admin content manager it is not reflected. how to make it work? is it even possible in strapi 5?

This topic has been created from a Discord post (1298308675412168775) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord