Supported Add-On Api events.


List of supported events available for triggering Add-On module.

Event Name Event Scope The event definition in the export.json Triggerring conditions Description
OnBefore Global "onBeforeAddons": [
{
...
}
]
➦ Triggered once per job
➦ Triggered before the migration job is started
➦ There are no records yet to access and modify.
➦ The script configuraiton can be modified
OnAfter Global "onAfterAddons": [
{
...
}
]
➦ Triggered once per job
➦ Triggered after the migration job is completed
➦ Modifications will not have any impact
OnDataRetrieved Global "onDataRetrievedAddons": [
{
...
}
]
➦ Triggered once per job
➦ Triggered after all records of all objects are already retrieved from the Source and the Target, but before starting to update the Target.
➦ The source records of all objects can be accessed and modified.
➦ The target records of all objects can be accessed and modified only if not Insert operation is being executed, since on Insert the records do not exist in the Target yet.
Object.OnBefore Object "onBeforeAddons": [
{
...
}
]
➦ Triggered once in loop for each object
➦ Triggered after all records of all objects are already retrieved from the Source and the Target, but before starting to update the Target.
➦ Triggered before the OnDataRetireved event
➦ Similar to the global OnDataRetrieved event, but in the object scope.
➦ The same actions can be done in both events as your preference.
Object.OnAfter Object "onAfterAddons": [
{
...
}
]
➦ Triggered once in loop for each object
➦ Triggered after all objects are already updated, but before the job is completed.
➦ Triggered before the global OnAfter event
➦ Similar to the global OnAfter event but in the object scope.
➦ The same actions can be done in both events as your preference.
Object.OnTargetDataFiltering Object "onTargetDataFilteringAddons": [
{
...
}
]
➦ Triggered once per object
➦ Triggered when the source records are prepared for updating the Target.
➦ Triggered before the OnBeforeUpdate event
➦ Here you can access, modify and filter the source records using the tempRecords property defined in the SfdmuRunAddonTask object.
➦ The modified records you are assigning to this property will be used as the data source for this object to update the Target org.
Object.OnBeforeUpdate Object "onBeforeUpdateAddons": [
{
...
}
]
➦ Triggered once per object during the target update phase
➦ Triggered just before the current object is going to be updated in the Target org.
➦ The source records can be accessed and modified.
➦ Here you have the only option to assess and modify the final version of the source records which are now about to be transferred to the Target.
➦ For your convenience, you also can work with 2 separated groups of records: RecordsToBeUpdated and RecordsToBeInserted
Object.OnAfterUpdate Object "onAfterUpdateAddons": [
{
...
}
]
➦ Triggered once per object during the target update phase
➦ Triggered immediately after the current object is updated in the Target org.
➦ Both the source and the target records can be accessed and modified.
➦ Since this event is triggered during the update phase of the object, so unlike the OnAfter event your modification of the records can have impact on processing of other objects which were not processed yet.
Last updated on 29th Jan 2023