I have tried to create custom customer attribute and it is working fine, but i have tried to filter this from grid like asc or dec. it is showing error.I have attached screen shot with it. Screenshot by error message

[2018-11-21 05:09:40] main.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customer_clv' in 'order clause', query was: SELECT main_table.* FROM customer_grid_flat AS main_table ORDER BY customer_clv ASC

customer_listing.xml file

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="customer_clv" class="Suyati\Customer\Ui\Component\Listing\Column\Customerclv">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="editor" xsi:type="string">text</item>
                    <item name="sortable" xsi:type="string">true</item>
                    <item name="label" xsi:type="string" translate="true">Customer Lifetime Value</item>
                    <item name="sortOrder" xsi:type="number">10</item>
  • Can you please update your question with customer_listing.xml file – Ramkishan Suthar Nov 21 '18 at 5:51
  • @RamkishanSuthar updated, I donot have any model files – Naveenbos Nov 21 '18 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.