Adding Entityreference field functionality