Clear the [[BaseObject]] from the cache.
// you store time information about each object and want to clear them if they're older than 5 seconds
console.log(objList)
// [{id: id1, timestamp: 1555100262645},{id: id2, timestamp: 1555100277174}]
const cleanupObj = objList => {
const expTime = new Date().getTime() - 5000;
for (const obj of objList) obj.timestamp < expTime && obj.id.clearCache();
}
setInterval(cleanupObj(objList),5000);
// gonna be honest, setInterval doesn't exist in bluestep.js because it's part of the WindowOrWorkerGlobalScope namespace in JS
Get [[BaseObject]] associated with the [[Id]]. Akin to [[B.find]].
Get the global Id, which is defined as an [[AltId]] with the [[AltId.name]] of 'GID'.
// see if any forms' GIDs are overlapping
B.queries.byFID['allUsers'].require();
const gidSet = new Set();
for (const user in allUsers) {
const gid = user.id().globalId();
gidSet.has(gid) ? console.log(`${user} GID is duplicate`) : gidSet.add(gid);
}
Check if [[Id]]s are equal regardless if they are [[AltId]] variations. This is like a double equals whereas [[equals]] is like a triple equals.
Get the [[Id]] object for the organization. Its [[classId]] will be 111111.
How entities are identified in the system. Can by either system or user assigned. When an ID is system-assigned, it is also referred to as UID. See [[AltId]] for an explanation of
FID
,SID
,GID
, andUID
.Regex representation:
/
[[classId]]_
[[u]]?_
[[AltId.name]]?_+(
[[shortId]]|
[[AltId.value]])/
e.g. 123456_U123456__1
Example: ```javascript B.queries.byFID['allUsers'].require(); const userIds = allUsers.map(u => u.id()); ```