Ref interface

A JavaScript object implementing the Ref interface is a reference to an object in the Object Store.


Use O.ref().

To avoid hardcoding Ref values in your plugin, use the behaviour lookup functions.

If you have an array of Ref objects, the O.deduplicateArrayOfRefs() function may be useful.


property objId

The object ID of the object.

function toString()

Return the reference in ‘presentation’ format, used in URLs and XML.

function load()

Load the referred object, returning an object implementing the JavaScript interface StoreObject.

Note that deleted objects can still be loaded. Use the deleted property if checking that object hasn’t been deleted is important. However, in many cases, you should just use it anyway.

function deleteObject()

Deletes the object referred to by this reference, without loading it first. Has the same effect as the deleteObject function on a StoreObject, but more efficient if the object has not already been loaded.

function behaviour

Returns the ‘behaviour’ of the object represented by this Ref. See Behaviours for how this property is determined and the intended use.

If the object does not have a behaviour, this property is null.

The current user’s permissions are not enforced when reading the object store to determine the behaviour.