Adds the key-value pair to the AltIds of this object. This will overwrite any existing value for the key on any object that has the same classId without warning you, so use this with caution.
Creates a new group entry data object and applies it to a specific unit.
const { request, response } = B.net;
const unitId = "111000___148502";
allRes.currentUnit(unitId);
allRes[0].unit()
.addGroupEntryData({
// id of the 'Group Entry'
groupEntryId: '530101___1',
// ids of all residents affected
recordIds: ['1000002___1154989'],
// key/value pairs where the key is the formula identifier of the field being updated
commonFieldsData: { 'homePhone': '(801) 654-5978' }
});
Creates a Unit
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.
OptionalclassType: string | numberSets the Organization's contact's address.
Sets the Organization's contact's email.
Gets the contact name that is set in Unit Information page.
// assumes you have an array of units
Sets the Organization's contact's name.
Sets the Organization's contact's phone.
The modification context of this object. Contains metadata about the last modification, such as which formula(s) triggered the change. Returns null if no context is available.
The "created at" timestamp of this object.
The creator of this object.
Gets the Default Domain configured in the Domain Manager for this unit. A unit with no default gets its first own domain, or failing that its nearest parent's. Null if none is found.
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 this group Entry data, with the option to additionally delete the underlaying entries.
OptionaldeleteConnectedEntries: boolean
passing true will delete all associated entries; default is false
Deletes the group Entry data with the passed id, preserving the underlaying entries
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 the domain url.
Gets an array of all the object's ancestors.
Invites people to join this unit, emailing each a link to the site named. The invitations and their emails
are issued exactly as an administrator issues them over GraphQL (createOrganizationInvites), and checked
against the user this script runs as: they must administer this unit (or a unit above it, or the site
itself where it sits in this unit), and be able to add members to every security group named.
A dynamic security group may be named when an invitation can grant it: the invitation then sets, on the new
user's record when they sign up, the values its rule needs, and you must be able to set each of them. A group
no values can make true, groups needing different values of one field, and values that would also put the
invitee in a dynamic group the call does not name are refused by position, as createOrganizationInvites
refuses them (organizationInviteOptions says which groups qualify).
Each email is sent from the platform's address as "
It is all or nothing. Every address and group is checked before anything is refused, and one error names
every one refused for the same reason by its position (emails[1], emails[3]: ...). Emails are rendered
before anything is written, and if one cannot be sent, such as when your hourly sending quota runs out
part-way through, no invitation or email from the call is kept. Only the call is undone: a script that
catches the error keeps the rest of its work. The invitations are part of the script's own changes, so
they are kept, and their emails sent, only if the script finishes without error. The script must be
allowed to make changes.
const invites = unit.inviteUsers({
emails: ['ada@example.com', 'grace@example.com'],
site: '230001___17',
securityGroups: ['440000___12'],
email: { component: '711000___3', props: { greeting: 'Welcome aboard' }, subject: 'Join us' },
});
const lines = [];
invites.each(invite => lines.push(`${invite.email()} ${invite.status()} until ${invite.expiresAt()}`));
Returns the Local Cache object for this Thread/Base Object.
Same as calling optLock().orElse(null)
The [[User]] that last modified this object.
A [[Java.Optional]] of the ancestor with the specific class.
A [[Java.Optional]] of the current object's parent object.
OptionalclassType: string | numberSame as calling optParent(var).orElse(null)
OptionalclassType: string | numberGets the primary [[Relate.RecordContainer]] for the Unit. This holds all of the [[Relate.Record]]s for the Unit. It's used, e.g., on the Change Unit page.
Removes the AltId with the specified key from this object, if it has one. There is no error if the key does not exist.
Reset the current object so that it is cleared from the cache and looked up from the database.
Sets the units ability to show a manage link
Sets the Organization's Email.
Makes changes to the database for this object
Applies updates to a group entry data object. You will get an error if the passed
id is not found and/or if you pass fields that don't exist
const { request, response } = B.net;
const unitId = '111000___148502';
allRes.currentUnit(unitId);
allRes[0].unit()
.updateGroupEntryData({
groupEntryDataId: '530103___701', // id of the 'Group Entry Data'
commonFieldsData: { 'homePhone': '(801) 654-5978' } // key/value pairs
});
The versions of this object.
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