GenericDocumentExtension extension

Extension function to GenericDocument to make it easier to access fields.

on

Methods

childByDocumentType(String name) GenericDocument?

Available on GenericDocument, provided by the GenericDocumentExtension extension

Returns a sub-document given its document type name. Returns null if not found.
childrenByDocumentType(String name) List<GenericDocument>

Available on GenericDocument, provided by the GenericDocumentExtension extension

Returns all children of generic document given its document type name. Returns null if not found.
fieldByTypeName(String name) Field?

Available on GenericDocument, provided by the GenericDocumentExtension extension

Returns a field given its local or common type name. Returns null if not found.
fieldsByTypeName(String name) List<Field>

Available on GenericDocument, provided by the GenericDocumentExtension extension

Returns all fields given a local or common field type name.