Loosely Coupled Triggers with Custom Metadata

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional tightly-coupled database triggers require specific entities to be defined at the time of trigger creation, making them inefficient when entities are not defined during trigger code development, and metadata techniques are limited in describing and utilizing custom metadata for third-party developers.

Innovation Solution

The implementation of loosely-coupled triggers that allow custom metadata types to be defined and linked to triggers before compilation, enabling dynamic coupling with triggerable database objects at runtime, and allowing users to select entities through a user interface after trigger code compilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If tightly-coupled triggers are used with specific entities defined at trigger creation, then trigger execution is straightforward and reliable, but the system lacks flexibility when entities are not defined during trigger code development

Engineering Contradiction:
Improvetrigger execution reliabilityVSAvoidentity definition flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent implements loosely-coupled triggers that separate entity definition from trigger compilation. Entities are dynamically defined through custom metadata types and records after the trigger is compiled, allowing the system to adapt to different entity configurations without recompiling the trigger code. This dynamic approach resolves the contradiction by enabling flexible entity definition while maintaining reliable trigger execution through runtime entity resolution.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent segments the trigger system into distinct components: the trigger code itself, custom metadata types, and custom metadata records. This segmentation allows the trigger to be compiled independently of specific entities, while entities are defined through separate metadata records that are resolved at runtime. This separation enables both reliable trigger execution and flexible entity adaptation.

Inventive Principle:
Principle #1Segmentation

2Adaptability or versatility

If custom metadata types are defined before trigger compilation, then third-party developers can utilize custom metadata, but the system complexity increases

Engineering Contradiction:
Improvecustom metadata utilizationVSAvoidsystem structure complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent creates a universal custom metadata type system that can be applied to multiple different triggers and entities. A single custom metadata type definition can serve multiple purposes across different trigger scenarios, reducing the need for separate custom metadata definitions for each trigger. This universality enables third-party developers to utilize custom metadata while managing system complexity through reusable metadata templates.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Adaptability or versatility

If loosely-coupled triggers allow dynamic entity coupling at runtime, then flexibility is improved, but performance overhead and memory usage increase

Engineering Contradiction:
Improveruntime entity coupling flexibilityVSAvoidtrigger execution efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent performs preliminary actions by defining custom metadata types and establishing trigger-metadata relationships before trigger execution. The system pre-processes and validates custom metadata records, so that at runtime, the trigger only needs to resolve specific entity references rather than performing complete entity validation. This preliminary preparation reduces runtime overhead while maintaining flexible dynamic coupling.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9977814B2Custom metadata in loosely coupled triggers
Publication Date: 2018.05.22 SALESFORCE INC
  • US9977814B2 patent drawing
  • US9977814B2 patent drawing
  • US9977814B2 patent drawing

AI summary

A database system that supports associating a custom metadata type with loosely coupled triggers may be implemented to include instructions to receive a definition of a custom metadata type, the definition comprising at least one relationship field associated with a triggerable database object. The database system may also include instructions to associate the definition of the custom metadata type with a loosely-coupled trigger, and to cause the loosely-coupled trigger to execute based on generating a custom metadata record of the custom metadata type. The custom metadata record including a triggerable database object value for the relationship field.