Galapagos - Patch (21.30)
Kaptio is proud to present this new Patch Release for Galapagos.
Trigger Control API for External Code (ST-1620)
Trigger Control API for External Code API This feature introduces a global utility class that allows customers to control Kaptio trigger behavior programmatically, using their custom code. This provides greater flexibility for bulk operations, data migrations, and custom integrations where trigger execution needs to be temporarily suspended to optimise performance. No manual configuration is required to enable this feature. The `TriggerControl` class is automatically available as a global class upon deploying the package. **Individual Trigger Control:** `TriggerControl.disableTrigger(String domainClassName)` disables a specific trigger for the given SObject domain class. `TriggerControl.enableTrigger(String domainClassName)` enables a previously disabled trigger. **Supported Domain Classes:** 'Itineraries' (Itinerary__c), 'ItineraryItems' (ItineraryItem__c), 'ItineraryBookings' (ItineraryBooking__c), 'Passengers' (Passenger__c), 'PassengerItineraryUnitAssignments' (PassengerItineraryUnitAssignment__c), 'ItineraryGroups' (ItineraryGroup__c), 'ItineraryServices' (ItineraryService__c), 'ItineraryContents' (ItineraryContent__c), 'PaymentSchedules' (PaymentSchedule__c). **Bulk Trigger Control:** `TriggerControl.disableAllKaptioTriggers()` disables all common Kaptio triggers in a single call. `TriggerControl.enableAllKaptioTriggers()` enables all common Kaptio triggers in a single call. **Use Cases:** 1) Data Migrations - temporarily disable triggers during bulk data imports to improve performance and avoid recursive trigger execution. 2) Custom Integrations - control trigger execution when syncing data with external systems. 3) Bulk Operations - disable triggers during mass updates to prevent unwanted automation. 4) Testing - control trigger behavior in test classes for isolated unit testing. **Important Considerations:** Trigger state changes are only effective for the current execution context. Trigger states automatically reset after transaction completion. Invalid domain class names are silently ignored (no exceptions thrown). Users need appropriate permissions to execute global classes. Always re-enable triggers after completing operations to ensure normal system behavior.