cancel
Showing results for 
Search instead for 
Did you mean: 

[Magento2.2]Show a custom attribute in Customer table in administration template

SOLVED

Re: [Magento2.2]Show a custom attribute in Customer table in administration template

Re: [Magento2.2]Show a custom attribute in Customer table in administration template

Hi @RanjeetBhojwani ,

 

that thread helped me! 

To fix the issue i had to Update my custom attributes adding the 

 'is_used_in_grid' => true,

param in the Customer Entity, when creating the new attributes. Then i created the /etc/indexer.xml file with the following content:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
<indexer id="customer_grid">
<fieldset name="customer">
<field name="codice_fiscale" xsi:type="filterable" dataType="varchar"/>
<field name="piva_azienda" xsi:type="filterable" dataType="varchar"/>
</fieldset>
</indexer>
</config>

 and now everything it's working as it should. Thank you