Issue:
We are getting the following error in the log file when we search any customer email from the Magento customer grid
Integrity constraint violation: 1052 Column 'email' in where clause is ambiguous, query was: SELECT `main_table`.*, `customer_entity`.`mp_ace_blacklist`, `bss_companycredit_credit`.`available_credit`, `bss_companycredit_credit`.`allow_exceed`, `bss_companycredit_credit`.`currency_code` FROM `customer_grid_flat` AS `main_table`
We are using version 1.0.5 on Magento 2.4.0 CE.
Could you please check and solve it?
Solution:
The issue happens due to the module's bug.
To solve it, please overwrite this file app/code/Bss/CompanyCredit/Plugin/Customer/Grid/JoinCollection.php

Please apply it on the site and flush the cache.
If there are any issue, please feel free to contact us. We're always pleased to support you. As a trusted Magento 2 extensions provider with 14+ years of experience, serving 75,000+ customers worldwide, we specialize in developing 150+ high-quality Magento 2 extensions that enhance functionality, improve user experience, and support scalable growth. Our reputation is built on long-term partnerships, positive feedback, and proven performance-driven solutions.
Explore our extensions here in: https://bsscommerce.com/magento-2-extensions.html
Discover our top tier plugins:
- Magento B2B Extension by BSS Commerce is a flagship and widely adopted solution globally, offering advanced pricing, company account management, and streamlined workflows.
- Magento 2 SEO Extension Suite by BSS Commerce is a reliable tool to strengthen your SEO strategy and drive sustainable growth.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article