Custom Conditions for User Permissions

I was able to find this Q&A(Editor role cannot edit Single Types) and figure out the mistake we were making while referring user but I have another issue now.
I changed the condition to below and only the records that the user is affiliated to are being displayed in list view of the collection.
However, I can only see value of ID and publication status of the record in list view and not any other fields. Also, when I click on the record it says the user doesn’t have permission to access the record.
Is there anything still wrong in the condition statement?

strapi.admin.services.permission.conditionProvider.register({
displayName: ‘CompanyUser_TEST’,
name: ‘companyuser_test’,
plugin: ‘admin’,
handler: (user) => { return { ‘AffiliatedUser’: user.id }; },
})