Magento Customer Grid Custom attribute can't export csv and export xml, Showing error, how to add custom attributes to the customer export.
PHP Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Framework\View\Element\UiComponentFactory::argumentsResolver() must be of the type array, null given, called in /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php on line 220 and defined in /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php:172\nStack trace:\n#0 /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php(220): Magento\Framework\View\Element\UiComponentFactory->argumentsResolver('customer_clv', NULL)\n#1 /var/www/Magento/vendor/magento/module-ui/Component/Listing/Columns/Column.php(77): Magento\Framework\View\Element\UiComponentFactory->create('customer_clv', 'decimal', Array)\n#2 /var/www/Magento/vendor/magento/module-ui/Component/MassAction/Filter.php(182): Magento\Ui\Component\Listing\Columns\Column->prepare()\n#3 /var/www/Magento/vendor/magento/module-ui/Component/MassAction/Filter.php(180): Magento\Ui\Component\MassAction\Filte in /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php on line 172, referer:
customer_listing.xml file containd below code.
<?xml version="1.0" encoding="UTF-8"?> <!-- /** * Copyright © Ourmodule. All rights reserved. * */
--> <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="Ourmodule\Customer\Ui\Component\Listing\Column\Customerclv">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="boolean">true</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="sortable" xsi:type="boolean">true</item>
<item name="editor" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Customer Lifetime Value</item>
<item name="sortOrder" xsi:type="number">81</item>
</item>
</argument>
</column>
<column name="predicted_average_profit" class="Ourmodule\Customer\Ui\Component\Listing\Column\Customerclv">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="boolean">true</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="sortable" xsi:type="boolean">false</item>
<item name="editor" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true"> Transaction Value</item>
<item name="sortOrder" xsi:type="number">82</item>
</item>
</argument>
</column>
<actionsColumn name="actions" class="Ourmodule\Customer\Ui\Component\Listing\Column\ClvActions">
<settings>
<indexField>entity_id</indexField>
</settings>
</actionsColumn>
</columns> </listing>