Build relation and customize view