An object of alternate ids for this object, with values as [[AltId]]
An array of alternate ids for this object.
Same as calling optAncestor(var).orElse(null)
If this object is a Collection it returns it as an array. The majority of objects in the system are Collections. For most objects, this is the same as calling [[children]].
Get the children of the object. This retrieval goes one level deep.
Optional
classType: string | numberClears a document field to no longer reference a document.
If shouldDelete
is true
, it will also delete the document it's referencing.
If shouldDelete
is false
, it will leave the document untouched.
If shouldDelete
is absent, it will follow the document's cleanup policy (defined in field edit).
Optional
shouldDelete: booleanSame as calling documentVersions().content(settings). See [[DocumentVersions.content]]
Sets the content to the provided bytes after applying [[NewContentSettings]]. Same as newContent().apply(settings).content(bytes)
Sets the content to the string after applying [[NewContentSettings]]. Same as newContent().apply(settings).content(content)
See [[DocumentVersions.contentFromUrl]]
Same as calling documentVersions().contentSize(). See [[DocumentVersions.contentSize]]
Same as calling documentVersions().contentTimestamp(). See [[DocumentVersions.contentTimestamp]]
Same as calling documentVersions().contentType(). See [[DocumentVersions.contentType]]
Same as calling documentVersions().contentType(
The "created at" timestamp of this object.
Same as calling documentVersions().createdCredential(). See [[DocumentVersions.createdCredential]]
Same as calling documentVersions().createdTimestamp(). See [[DocumentVersions.createdTimestamp]]
The creator of this object.
Same as calling documentVersions().davUrl(). See [[DocumentVersions.davUrl]]
The deleted children of this object. Only looks one level deep. E.g. a form's deleted children could include fields and form entries. A folder's deleted children could include folders, forms, and formulas, but not any of those forms' entries.
TODO
The default display name of this object. For the most part, this is the same as calling toString()
, which is the same as inserting the object into a string.
Sets the Display Name.
TODO
Same as calling documentVersions().existingContent(). See [[DocumentVersions.existingContent]]
Same as calling documentVersions().filename(). See [[DocumentVersions.filename]]
Same as calling documentVersions().folder(). See [[DocumentVersions.folder]]
Same as calling documentVersions().forInputStream(settings, input => {}). See [[DocumentVersions.forInputStream]]
Returns this field's [[FormMetaData]] object.
Sets the content to the provided OutputStream after applying [[NewContentSettings]]. Same as newContent().apply(settings).forOutputStream(out => {})
Same as calling documentVersions().forReader(settings,reader => {}). See [[DocumentVersions.forReader]]
Sets the content to the provided Writer after applying [[NewContentSettings]]. Same as newContent().apply(settings).forWriter(writer => {})
Same as calling documentVersions().fullPath(). See [[DocumentVersions.fullPath]]
Gets an array of all the object's ancestors.
The [[Id]] of this object bounded to T.
Same as calling documentVersions().imageHeight(). See [[DocumentVersions.imageHeight]]
Same as calling documentVersions().imageWidth(). See [[DocumentVersions.imageWidth]]
Same as calling documentVersions().notes(). See [[DocumentVersions.isVersioned]]
TODO
Returns the Local Cache object for this Thread/Base Object.
Same as calling optLock().orElse(null)
Optional
options: stringReturns the [[FieldMetaData]] object that this describes this field.
Same as calling documentVersions().modifiedTimestamp(). See [[DocumentVersions.modifiedTimestamp]]
The [[User]] that last modified this object.
TODO
Optional
create: booleanReturn a [[NewContent]]
Same as calling documentVersions().notes(). See [[DocumentVersions.notes]]
Same as calling documentVersions().notes(
Optional value for this field. Same as [[valOpt]]. Try to use this as often as you can over val()
; Null-pointer exceptions can be a pain, and this will provide a measure of safety. Try to reserve val()
for situations where a field is required and you know that the value cannot be null.
A [[Java.Optional]] of the ancestor with the specific class.
A [[Java.Optional]] of the current object's parent object.
Optional
classType: string | numberSame as calling optParent(var).orElse(null)
Optional
classType: string | numberSame as calling documentVersions().path(). See [[DocumentVersions.path]]
Same as calling documentVersions().permUrl(). See [[DocumentVersions.permUrl]]
Same as calling documentVersions().referenceCount(). See [[DocumentVersions.referenceCount]]
Same as calling documentVersions().rename(filename). See [[DocumentVersions.rename]]
Reset the current object so that it is cleared from the cache and looked up from the database.
Same as calling documentVersions().thumbnail(). See [[DocumentVersions.thumbnail]]
Same as calling documentVersions().thumbnail(thumbnailSettings). See [[DocumentVersions.thumbnail]]
Same as calling documentVersions().toBytes(settings). See [[DocumentVersions.toBytes]]
The [[Id]] or [[AltId]] that the system deems most relevant.
Makes changes to the database for this object
Gets the field's value if there is one, and will otherwise return null. Some overrides of this method have default return-values for convenience but, that would not make sense for this: the general-use case. In situations where the value might be null
(e.g. non required field), consider using optional chaining: field.val()?.toString()
.
The preferred method to handle null
s in bs.js is simply [[opt]]/[[valOpt]]; as the methods available off of that can handle virtually any situation.
This is identical to calling field.opt().orElse(null)
.
Optional value for this field. Alias for [[opt]].
Same as calling documentVersions().versioned(
The versions of this object.
Returns a view URL for this object, if it has one. This value is always a relative URL, meaning it does not contain the protocol prefix or domain name such as http://xyz.bluestep.net
.
TODO
Example