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.
An object of alternate ids for this object, with values as [[AltId]]
An array of alternate ids for this object.
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 | numberUnsigns a signature field which is currently signed. Be cautious that you're not getting rid of a signature that could have legal repercussions.
The "created at" timestamp of this object.
The creator of this object.
Gets the professional credential (MD, RN, etc.) of the [[User]] who signed the field. See [[User.credential]] for more info.
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.
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.
Returns this field's [[FormMetaData]] object.
Gets an array of all the object's ancestors.
The [[Id]] of this object bounded to T.
Indicates as to if the field has just been signed.
TODO
I believe this has something to do with the [[Lock]] API.
Returns the Local Cache object for this Thread/Base Object.
Same as calling optLock().orElse(null)
Optionaloptions: stringReturns the [[FieldMetaData]] object that this describes this field.
The [[User]] that last modified this object.
Optional value for this field. Same as [[valOpt]]. Try to use this as often as you can over val(); Null-pointer exceptions can be a pain, and this will provide a measure of safety. Try to reserve val() for situations where a field is required and you know that the value cannot be null.
A [[Java.Optional]] of the ancestor with the specific class.
A [[Java.Optional]] of the current object's parent object.
OptionalclassType: string | numberAn [[Optional]] of the [[Java.Time.Instant]] the field was signed.
const compareSigDate = (sig, millis) => {
const diff = sig.timeStamp().get().now() - millis;
let preposition = diff > 0 ? 'after' : diff === 0 ? 'on' : 'before';
const toDate = new Date(millis);
const date = `${toDate.getFullYear()}-${toDate.getMonth()+1}-${toDate.getDate()}`;
return `${sig.optUser().get().fullName()} signed this ${preposition} ${date}`;
}
Same as calling optParent(var).orElse(null)
OptionalclassType: string | numberRemoves 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.
This method signs a signature field which is currently unsigned.
Returns true if signing was successful.
An [[Java.Time.Instant]] the field was signed or null. Same as calling optTimeStamp().orElse(null)
The [[Id]] or [[AltId]] that the system deems most relevant.
Returns in the form of "[[User.firstName]] [[User.lastName]], [[User.credential]], [[timeStamp]]".
Makes changes to the database for this object
An [[User]] or null that signed the field. Same as calling optUser().orElse(null)
Gets the field's value if there is one, and will otherwise return null. Some overrides of this method have default return-values for convenience but, that would not make sense for this: the general-use case. In situations where the value might be null (e.g. non required field), consider using optional chaining: field.val()?.toString().
The preferred method to handle nulls in bs.js is simply [[opt]]/[[valOpt]]; as the methods available off of that can handle virtually any situation.
This is identical to calling field.opt().orElse(null).
Optional value for this field. Alias for [[opt]].
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.
As seen in [[FieldMetaData.formatType]], there are two types of signatures:
simpleandsecure. On the New Signature Field GUI, these are called "Simple" and "Digital Signature".simpleis a checkbox that will sign it with their [[User]] info and timestamp.securerequires a passphrase to sign.There is a Merge Report and End Point, called "Mobile Signature Edit" and "Mobile Signature Script", that can be applied to make a memo field work as a biometric touch screen signature. At some point that functionality will be built into the [[SignatureField]].