Represents a Relate Relationship

Hierarchy

Constructors

Properties

allFields: [Field<any, any>]

All [[Field]] Objects regardless of if they contain a formula id.

fields: {
    [key: string]: Field<any, any>;
}

All [[Field]] Objects that contain a formula id.

Type declaration

  • [key: string]: Field<any, any>

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<FormEntry>

    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

  • Get a single bluestep.js [[MergeReport]] which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given. If the name begins with an under-bar, indicating that the property may not be unique, then the first merge report found will be returned. If there was a problem then results will be null and message will contain the problem.

    Parameters

    • search: string
    • value: string

    Returns {
        message: string;
        results: MergeReport<any>;
    }

    Example


    const mergeReport = curEntry.applicableBsJsMergeReportResults('_pageId', 'testMergeReport').results;
  • Get a single [[MergeReport]] which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given. If the name begins with an under-bar, indicating that the property may not be unique, then the first fixed report found will be returned. If there was a problem then results will be null and message will contain the problem.

    Parameters

    • search: string
    • value: string

    Returns {
        message: string;
        results: MergeReport<any>;
    }

    Example


    const fixedReport = curEntry.ap OplicableFixedReportResults('_pageId', 'testFixedReport').results;
  • Get a single RelateScript [[MergeReport]] which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given. If the name begins with an under-bar, indicating that the property may not be unique, then the first merge report found will be returned. If there was a problem then results will be null and message will contain the problem.

    Parameters

    • search: string
    • value: string

    Returns {
        message: string;
        results: MergeReport<any>;
    }

    Example


    const mergeReport = curEntry.applicableMergeReportResults('_pageId', 'testMergeReport').results;
  • 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());
    
  • Creates a copy of the current [[FormEntryScript]] that can be used. This can only be used on Multi-Entry forms.

    Returns FormEntry

    Example


    const copiedFormEntry = curEntry.copyEntry();
  • A String field containing the URL to create a new entry of this form within the User Profile/My Account area. The URL contained by this field only works correctly when clicked by the user who's record the current entry belongs to. Other users will receive an error when attempting to go to the URL.

    Returns string

  • A String field containing the URL to create a new entry of this form. This value will be null for single-entry forms. This value is always a relative URL meaning it does not contain the protocol prefix or domain name such as http://xyzzy.bluestep.net.

    Returns string

  • The "created at" timestamp of this object.

    Returns Instant

    Example

    const createdAt = `<div class="created-at">${baseObject.created()}</div>`;
    
  • The creator of this object.

    Returns User

    Example

    alert(`Guess who created this. It was ${baseObject.creator().fullName()}. They are to blame.`);
    
  • 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();
    
  • 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>`;
    
  • The [[Id]] of this object bounded to T.

    Returns Id<FormEntry>

    Example


    const displayDiv = `<div class="object-card" id="${baseObject.id()}">
    <div class="title">${baseObject}</div>
    <div class="body">Hello World!</div>
    </div>;
  • Method indicating whether the entry has been selected or deselected as part of the current edit. Note this field will continue to be true, even if the [[isSelected]] value is returned to its original state.

    Returns boolean

  • Method indicating whether the entry has been deleted as part of the current operation. The data from the deleted entry is temporarily retained in memory so that it may be referenced during the remainder of the operation even though the entry is removed from the permanent data store.

    Returns boolean

  • 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 a boolean value indicating whether this particular entry is currently selected as a being related.

    Returns boolean

  • Method indicating whether the entry currently meets the criteria for a valid selection. Existing selections which were valid at the time they were selected may not be valid later, for instance if there is a condition based on the current date which automatically expires old entries.

    Returns boolean

  • Returns if the entry is writable.

    Returns boolean

    Example

    let isWritable = curEntry.isWritable()
    ;```
  • Returns a string value that uses the name and the configure setting of showLink.

    Returns string

  • Returns a string value of the name using configured using includeLink and includeRecordName paramaters.

    Parameters

    • includeLink: boolean
    • includeRecordName: boolean

    Returns string

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

    Returns Lock

  • Gets a list of [[MergeReport]] that have the current form as their primary form and which apply to the current record (based on category restrictions). An optional search value may be given which filters the list of reports to those who's names contain the given search string.

    Parameters

    • Optional search: string

    Returns EList<MergeReport<any>>

    Example


    const mergeReport = curEntry.mergeReports('Test Merge Report');
  • Parameters

    • Optional options: string

    Returns string

  • 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();
    
  • Returns a string value containing the value in the display field of the related form entry.

    Returns string

  • 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]]
  • Get a single bluestep.js [[MergeReport]] which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given. If the name begins with an under-bar, indicating that the property may not be unique, then the first merge report found will be returned.

    Parameters

    • search: string
    • value: string

    Returns Optional<MergeReport<any>>

    Example


    const mergeReport = curEntry.optApplicableMergeReport('_pageId', 'testMergeReport');
  • Get a single [[MergeReport]] which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given. If the name begins with an under-bar, indicating that the property may not be unique, then the first fixed report found will be returned.

    Parameters

    • search: string
    • value: string

    Returns Optional<MergeReport<any>>

    Example


    const fixedReport = curEntry.optApplicableFixedReport('_pageId', 'testFixedReport');
  • Get a single RelateScript [[MergeReport]] which has its primary form as the current form, applies to this record, and has the custom lookup property specified by the name and value parameters given. If the name begins with an under-bar, indicating that the property may not be unique, then the first merge report found will be returned.

    Parameters

    • search: string
    • value: string

    Returns Optional<MergeReport<any>>

    Example


    const mergeReport = curEntry.optApplicableMergeReport('_pageId', 'testMergeReport');
  • Checks for any groupEntryData objects this may be associated with, and returns its id as an optional if it can find one. By design, there will only ever be at most one groupEntryData associated with any one entry.

    Returns Optional<string>

  • 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

  • A String field containing the URL to view this entry in a format suitable for printing. This is most important for text and memo fields where the full value may not be visible within the smaller edit box.

    Returns string

  • Returns the default record display value for this record

    Returns string

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

    Returns void

  • Generates a [[FormulaScheduler]] object that will assist in triggering an On-Demand Formula to run.

    Parameters

    Returns FormulaScheduler

  • Cause an On-Demand formula to be run. If the result is null, that means the formulaIf the Result is not null, then it will contain an error message explaining why the operation was not successful.

    Parameters

    Returns string

  • Select this entry to being related. This method requires that the [[RelationshipField]] is writable.

    Parameters

    • val: boolean

    Returns void

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

    Returns Id<FormEntry> | AltId<FormEntry>

    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();
    
  • A String field containing the URL to view and/or edit this entry within the User Profile/My Account area. The URL contained by this field only works correctly when clicked by the user who's record the current entry belongs to. Other users will receive an error when attempting to go to the URL.

    Returns string

  • 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>;
    
  • Method indicating whether the entry was selected at the beginning of the edit

    Returns boolean

Generated using TypeDoc