updateField
Update the field value of the SObject, by giving a new value or an updating function.
bulkObj.newStream
.subscribe(Trap.F.updateField.apply('Subject', 'New subject'));
Update the field value of the SObject, by giving a new value or an updating function.
bulkObj.newStream
.subscribe(Trap.F.updateField.apply('Subject', 'New subject'));
Add an error to the SObject.
bulkObj.newStream
.subscribe(Trap.F.addError.apply('test error'));
Do validation against the SObject.
bulkObj.newStream
.subscribe(Trap.F.validate.apply(R.propSatisfies.apply('Subject', R.isNotNull), 'Should not be null'));
Get the old value.
bulkObj.newStream
.filter((Func)R.pipe.run(
Trap.F.getOld,
new CustomFilterFunc()
))
.subscribe(...);
Get the new value.
bulkObj.oldStream
.filter((Func)R.pipe.run(
Trap.F.getNew,
new CustomFilterFunc()
))
.subscribe(...);
Check if a field has changed value.
bulkObj.newStream
.filter(Trap.F.changed.apply('Subject'))
.subscribe(...);
Check current trigger event.
bulkObj.newStream
.filter(Trap.F.isEvent.apply(Trap.Event.BeforeInsert))
.subscribe(...);
Check if it is the before insert event.
bulkObj.newStream
.filter(Trap.F.isBeforeInsert)
.subscribe(...);
Check if it is the before update event.
bulkObj.newStream
.filter(Trap.F.isBeforeUpdate)
.subscribe(...);
Check if it is the before delete event.
bulkObj.newStream
.filter(Trap.F.isBeforeDelete)
.subscribe(...);
Check if it is the after insert event.
bulkObj.newStream
.filter(Trap.F.isAfterInsert)
.subscribe(...);
Check if it is the after update event.
bulkObj.newStream
.filter(Trap.F.isAfterUpdate)
.subscribe(...);
Check if it is the after delete event.
bulkObj.newStream
.filter(Trap.F.isAfterDelete)
.subscribe(...);
Check if it is the after undelete event.
bulkObj.newStream
.filter(Trap.F.isAfterUndelete)
.subscribe(...);
Contribute on Github! Edit this section.