1. A method comprising: receiving input indicating a selection of a first database object to be used in creating a document template in a multi-tenant database system; retrieving a list of database fields related to the first database object; generating a graphical representation for each database field in the list of database fields retrieved from the first database object, the graphical representation for each of the database fields forming at least a part of the document template; displaying, in a user interface, the graphical representation for each database field related to the first database object; storing layout information of one or more selected graphical representations of one or more database fields in the document template in the multi-tenant database system; and rendering a document in a target format using the layout information in the document template.
6. The method of claim 1 , wherein the first database object has a database field that refers to a second database object related to the first database object, and wherein the database field has a reference to a foreign key for a database table of the second database object related to the first database object.