You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-20Lines changed: 23 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -798,26 +798,29 @@ If you want to add your own automation to the `Log__c` or `LogEntry__c` objects,
798
798
3.`Output` parameter `updatedTriggerNew` - If your Flow makes any updates to the collection of records, you should return a record collection containing the updated records
799
799
4.`Input` parameter `triggerOld` - The list of logger records as they exist in the datatabase
800
800
801
-
- Apex plugins: your Apex class should extend the abstract class `LoggerSObjectHandlerPlugin`. For example:
802
-
803
-
```apex public class ExamplePlugin extends LoggerSObjectHandlerPlugin {
804
-
public override void execute(
805
-
TriggerOperation triggerOperationType,
806
-
List<SObject> triggerNew,
807
-
Map<Id, SObject> triggerNewMap,
808
-
List<SObject> triggerOld,
809
-
Map<Id, SObject> triggerOldMap
810
-
) {
811
-
switch on triggerOperationType {
812
-
when BEFORE_INSERT {
813
-
for (Log__c log : (List<Log__c>) triggerNew) {
814
-
log.Status__c = 'On Hold';
815
-
}
816
-
}
817
-
}
818
-
}
819
-
}
820
-
801
+
- Apex plugins: your Apex class should implements `LoggerPlugin.Triggerable`. For example:
802
+
803
+
```apex
804
+
public class ExampleTriggerablePlugin implements LoggerPlugin.Triggerable {
805
+
public void execute(LoggerPlugin__mdt configuration, LoggerTriggerableContext input) {
806
+
// Example: only run the plugin for Log__c records
807
+
if (context.sobjectType != Schema.Log__c.SObjectType) {
0 commit comments