Adds a category by name or by a category object to the current record. The result is a boolean value which is true if the category was successfully added, false if the record already belonged to the category (or it was pending).
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]].
A Map of category to boolean values listing all possible categories for the current record. The boolean value indicates if the record will be in the category after pending change are applied.
Get the children of the object. This retrieval goes one level deep.
Optional
classType: string | numberThe "created at" timestamp of this object.
The creator of this object.
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.
Deletes the current record. A safer technique is to mark the record as ready for delete, then send yourself an email so you can go look at the record before you delete it.
WARNING: This really does delete the record. That means it will delete all of the entries from all of the forms belonging to this record, not just the forms the formula is accessing. This action is pretty much irreversable. Don't call this function unless you are 100% certain you are deleting the correct record and that deleting the record is the right thing to do. If in doubt, don't use this method.
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.
Gets an array of all the object's ancestors.
returns true if baserecord was or is a user
returns true if writable
Returns the Local Cache object for this Thread/Base Object.
Same as calling optLock().orElse(null)
The [[User]] that last modified this object.
This method is used to get information about the current record's navigation. Specifically, it gives you an object from which you can traverse the record navigation tree to access information about all of the navigable elements available to the record. The result of getRecordNav(...) is a navigation element object, described below. IMPORTANT: This method is a costly function to execute. Instead, use [[B.find]] or [[Id.find]] to retieve objects. Otherwise wach time this method is executed the system must build the record navigation tree which requires loading and processing the entire Relate structure and potentially loading/processing many of the fields on each form as well. In a large Relate configuration this can literally involve over 100,000 operations and many a seconds processing the formula. On an un-cached organization this function can take over 30 seconds to execute (although, to be fair, record navigation will eventually need to be loaded anyway). Avoid calling this function when possible. Also you might organize your code so this method only needs to be called once, then all navigation elements utilized in one go.
Optional
flags: stringResults in a new [[Record]] matching the record type and record categories of the current record. The new record will also be in the [[Unit]] where the current record resides. This method will throw an Error and will not create a new record if there are no writable forms available to populate data into the new record. Note that this function is similar, but not identical, to the [[Query.newRecord]] function. Specifically, there are four important differences.
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 | numberThis method returns the recent records to be inspected and modified. When inspecting recent records it is possible to get each record's name, id, unit, record type and current categories. Will throw an Error if the [[BaseRecord]] does not represent a [[User]].Recent records can be read and manipulated. See also [[User.recentRecords]] and [[ObjectB.optRecentRecords]]
Locks the current record. The expire value is not required and defaults to one hour for a new lock, or the current expire [[Java.Time.Instant]] for an existing lock. This function results in a String value indicating the version of the current entry. The result may be null if the lock was unsuccessful.
Optional
expire: InstantOrDateEach Record Type has a table in the databse. This method returns the record's row in that table.
To see the Record Types, open Relate and navigate Admin > Record Types. Two common types are Individual
and Facility
. If you click on Individual
and scroll down, you'll see a plentitude of fields. In common Relate vernacular, this form is called "Name and Email". Each [[Entry]] on this is a [[Record]] of type Individual, and it's those [[Entry]]s that can be returned by this function.
Removes a category by name or by a category object from the current record. The result is a boolean value which is true if the category was successfully removed, false if the record doesn't belong to the category (or it was pending removal).
Reset the current object so that it is cleared from the cache and looked up from the database.
Moves the record to the same unit as the data identified by [[Id]] or [[Unit]].
This is intended to used in conjunction with a relationship field where you select a record belonging to a different unit, and the formula moves the current record to the same unit as the selected record. However, other usages are also possible. Using this technique it is possible to allow users to move records without granting Editor to the record type and thus opening up permission to other more dangerous functions, such as delete record.
A String field containing the relative URL to view and/or edit this entry. 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 the [[Unit]]
Makes changes to the database for this object
Returns the [[User]] represented by this [[BaseRecord]]. Will throw an Error if the [[BaseRecord]] does not represent a [[User]].
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
.
A relate record with [[Form]] dependencies from a [[Query]]/report.