Contacta con nosotros
contacto@flabo.es

Obtener campos personalizados de usuarios

List<ExpandoColumn> customFields = new ArrayList<ExpandoColumn>();
try {
	// Custom fields for Users
	long classNameId = PortalUtil.getClassNameId(User.class);
	ExpandoTable table = ExpandoTableLocalServiceUtil.getTable(classNameId, "CUSTOM_FIELDS");
	customFields = ExpandoColumnLocalServiceUtil.getColumns(table.getTableId());
} catch (SystemException | PortalException e) {
	System.out.println("Error reading available custom fields.", e);
}