Simplified get relation fields and get doctype