diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 8ce0a1b3b451ac738bf15516fbcc1078fe3d5668..b46540ad6d984c39f0b46160e60b420b26f75249 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -753,7 +753,7 @@ class ExtraFields
 					$sqlwhere.= ' WHERE 1';
 				}
 				if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity;	// Some tables may have field, some other not. For the moment we disable it.
-				//$sql.=preg_replace('/^ AND /','',$sqlwhere);
+				$sql.=preg_replace('/^ AND /','',$sqlwhere);
 				//print $sql;
 
 				dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);