TODO

Example

TODO

Hierarchy

Constructors

Methods

  • An object of alternate ids for this object, with values as [[AltId]]

    Returns {
        [name: string]: AltId<T>;
    }

    Example

    // you've marked certain forms with the FID of deprecated and want to filter for those
    const warningMessage = baseObject.altIdsObject().FID.value().includes('deprecated') && 'Please use a different form';
  • An object of alternate ids for this object, with values as strings

    Returns {
        [name: string]: string;
    }

    • [name: string]: string

    Example

    // you've marked certain forms with the FID of deprecated and want to filter for those
    const warningMessage = baseObject.altIds().FID.includes('deprecated') && 'Please use a different form';
  • An array of alternate ids for this object.

    Returns EList<Document>

    Example

    // you've marked certain forms with the FID of deprecated and want to filter for those
    const warningMessage = baseObject.altIds().FID.includes('deprecated') && 'Please use a different form';
  • Same as calling optAncestor(var).orElse(null)

    Type Parameters

    Parameters

    • classType: string | number

    Returns B

  • 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]].

    Returns EList<BaseObject<any>>

    Example

    const ids = obj.asArray().map(ob => ob);
    
  • Get the children of the object. This retrieval goes one level deep.

    Parameters

    • Optional classType: string | number

    Returns EList<BaseObject<any>>

    Example

    const childrenNames = obj.children().map(child => child.displayName());
    
  • Returns the content as a string after applying the [[ExistingContentSettings]. Same as calling existingContent().apply(settings).toReaderContent().apply(settings).content().

    Parameters

    Returns string

  • Returns the content as a string using the default [[ExistingContentSettings]. Will use 'UTF-8' as the encoding. Same as calling existingContent().toReaderContent().content().

    Returns string

  • TODO

    Parameters

    • url: string

    Returns void

  • Returns the file size of the current document.

    Returns number

  • Returns the Content Type of the current document.

    Returns string

  • Sets the Content Type of the current document.

    Parameters

    • contentType: string

    Returns void

  • The "created at" timestamp of this object.

    Returns Instant

    Example

    const createdAt = `<div class="created-at">${baseObject.created()}</div>`;
    
  • Returns the user and timestamp relating to the upload of this document.

    Returns string

  • The creator of this object.

    Returns User

    Example

    alert(`Guess who created this. It was ${baseObject.creator().fullName()}. They are to blame.`);
    
  • Returns a webdav URL for the current document.

    Returns string

  • TODO

    Returns void

  • Returns a delete URL for this object, else a blank string. Following the URL will delete the object, so proceed with caution.

    Returns string

    Example

    const deleteBtn = `<button data-href="${baseObject.deleteUrl()}">Go to ${baseObject.displayName()}</button>;
    
  • 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.

    Returns EList<BaseObject<any>>

    Example

    const deleted = baseObject.deletedChildren();
    
  • TODO

    Returns string

  • 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.

    Returns string

    Example

    The following assumes you have already aggregated a selection of baseObjects into an array

    const displayNames = [];
    for (const o of baseObjects) displayNames.push(o.displayName());
    const namesList = `<ul><li>${displayNames.join('</li><li>')}</li></ul>`;
  • Sets the Display Name.

    Parameters

    • name: string

    Returns void

  • Returns an edit URL for this object, else a blank string.

    Returns string

    Example

    const editBtn = `<button data-href="${baseObject.editUrl()}">Go to ${baseObject}</button>`;
    
  • Returns the filename of the current document.

    Returns string

  • Returns the parent [[Folder]] of the current document.

    Returns Folder

  • Provides an Inputstream after applying the [[ExistingContentSettings]. Same as calling existingContent().apply(settings).forInputStream(input => {}).

    Parameters

    Returns void

  • Provides an Inputstream with default [[ExistingContentSettings]]. Same as calling existingContent().forInputStream(input => {}).

    Parameters

    • inConsumer: ((input) => void)

    Returns void

  • Provides a reader after applying the [[ExistingContentSettings]. Same as calling existingContent().apply(settings).toReaderContent().apply(settings).forReader(reader => {}).

    Parameters

    Returns string

  • Provides a reader with default [[ExistingContentSettings]]. Will use 'UTF-8' for enconding. Same as calling existingContent().toReaderContent().forReader(reader => {}).

    Parameters

    • inConsumer: ((reader) => void)
        • (reader): void
        • Parameters

          Returns void

    Returns string

  • TODO

    Parameters

    Returns void

  • Set new content using JavaByteArray. Same as calling fromBytes(newContent().apply(settings), bytes)

    Parameters

    Returns void

  • Set new content using JavaByteArray. Same as calling fromBytes(newContent(), bytes)

    Parameters

    Returns void

  • Set new content using string. Same as calling fromString(newContent().apply(settings), content)

    Parameters

    Returns void

  • Set new content using string. Same as calling fromString(newContent(), content)

    Parameters

    • content: string

    Returns void

  • Returns the path to the current document.

    Returns string

  • The [[Id]] of this object bounded to T.

    Returns Id<Document>

    Example


    const displayDiv = `<div class="object-card" id="${baseObject.id()}">
    <div class="title">${baseObject}</div>
    <div class="body">Hello World!</div>
    </div>;
  • TODO

    Returns number

  • TODO

    Returns number

  • Returns whether the object is locked or not.

    Returns boolean

    Deprecated

    Part of the [[Lock]] API.

    Example

    const isLocked = baseObject.isLocked();
    
  • Returns whether the object is pending a lock or not.

    Returns boolean

    Deprecated

    Part of the [[Lock]] API.

    Example

    const isPendingLock = baseObject.isPendingLock();
    
  • Returns whether the object is pending an unlock or not.

    Returns boolean

    Deprecated

    Part of the [[Lock]] API.

    Example

    const lockPendingUnlock = baseObject.isPendingUnLock();
    
  • Returns true if an Admin uploaded the document

    Returns boolean

  • Returns a true if the document is not uploaded yet

    Returns boolean

  • TODO

    Returns boolean

  • Same as calling optLock().orElse(null)

    Returns Lock

  • The modified date of this object.

    Returns Instant

    Example

    const isModified = baseObject.modified();
    
  • The [[User]] that last modified this object.

    Returns User

    Example

    const modifierName = baseObject.modifier().fullName();
    
  • TODO

    Parameters

    • destPath: string
    • Optional create: boolean

    Returns void

  • Returns the notes(descripton) set for the current document.

    Returns string

  • Sets the notes(description) for the current document.

    Parameters

    • notes: string

    Returns void

  • A [[Java.Optional]] of the ancestor with the specific class.

    Parameters

    • classType: string | number

    Returns Optional<BaseObject<any>>

    Example

    const ancestors = obj.optAncestor(1000001).ifPresent(a => console.log('${a} exists'));
    
    explore example
    [[Java.Optional.ifPresent]]
  • Returns the [[Lock]]

    Returns Optional<Lock>

    Deprecated

    Part of the [[Lock]] API.

    Example

    const lockExpire = baseObject.optLock();
    
  • A [[Java.Optional]] of the current object's parent object.

    Parameters

    • Optional classType: string | number

    Returns Optional<BaseObject<any>>

    Example

    const ancestors = obj.optAncestor(1000001).ifPresent(a => console.log('${a} found'));
    
    explore example
    [[Java.Optional.ifPresent]]
  • Same as calling optParent(var).orElse(null)

    Type Parameters

    Parameters

    • Optional classType: string | number

    Returns B

  • Returns the path to the current document relative to it's Document Library.

    Returns string

  • Returns a URL to access the current document.

    Returns string

  • TODO

    Returns number

  • TODO

    Parameters

    • filename: string

    Returns void

  • Reset the current object so that it is cleared from the cache and looked up from the database.

    Returns void

  • Returns a URL to access the current document that relies on the id of the field, rather than the name of the document.

    Returns string

  • Creates the "thumbnail" builder object with which you can build an image stored in a document field, or provide a link to download the contents. Minimum width/height is 56. If you do not pass a value, it will default still to 56.

    Returns DocumentThumbnail

    Example

    // passing an image to the the page
    B.out += documentField.thumbnail()
    .height(200)
    .width(200)
    .html(true) // If unspecified or this value is false, the result will be the relative link.
    .build(); // build must be called if you want any output of this
  • This is simply a shorthand method for when you are extracting images from document fields.for display on merge reports. Any value of either parameter less than 56 will default to 56.

    Parameters

    • width: number
    • Optional height: number

      if missing, this value will default to provided value for width.

    Returns void

    Example

    The Following techniques will create the same result

    documentField.thumbnailHtml(10,15);
    documentField.thumbnailUrl({height: 10, width: 15, html: true});
    documentField.thumbnail().width(10).height(15).html(true).build();
  • Just like thumbnail() but with the secondary methods built in; you simply pass the parametersas an object and .build() is called for you. Click DocumentThumbnailSettings type parameter below to see the list of available parameter values. Note that if you provide a height or a width, but not both, then the missing of those two will default to the value of the other; I.E. it will create a square image

    Parameters

    Returns string

    Example

    This result is equivalent to the example provided for the thumbnail() method

    B.out += documentField.thumbnailUrl({height: 200, width: 200, html: true})
  • Returns the current document as a byte array after applying the [[ExistingContentSettings]. Same as calling existingContent().apply(settings).toBytes().

    Parameters

    Returns ByteArray

  • Returns the current document as a byte array using default [[ExistingContentSettings]. Same as calling existingContent().toBytes().

    Returns ByteArray

  • The [[Id]] or [[AltId]] that the system deems most relevant.

    Returns Id<Document> | AltId<Document>

    Example


    const displayDiv = `<div class="object-card" id="${baseObject.topId()}">
    <div class="title">${baseObject}</div>
    <div class="body">Hello World!</div>
    </div>;
  • Returns the bluestep.js classpath for the current object.

    Returns string

    Example

    const isBool = testForm.fields.mysteryField.typeName().toLowerCase().includes('boolean')
    
  • Makes changes to the database for this object

    Returns void

  • The version of this object or empty string if it doesn't exist.

    Returns string

    Example

    const version = baseObject.version();
    
  • TODO

    Parameters

    • versioned: boolean

    Returns void

  • 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.

    Returns string

    Example

    const viewBtn = `<button data-href="${baseObject.viewUrl()}">Go to ${baseObject.displayName()}</button>;
    
  • Set new content using a [[Java.IO.DataHandler]]

    Parameters

    Returns void

Generated using TypeDoc