Check Salesforce Sales Engagement enabled using Apex

Check Salesforce Sales Engagement enabled using Apex

When Salesforce Sales Engagement is enabled and configured, specific objects and fields become available or are populated.

ActionCadence object: An ActionCadence record is created when you use the Sales Engagement app to create a cadence.

Use the following sample Apex code to find or check whether the Salesforce Sales Engagement feature is enabled or not using Salesforce Apex.

Sample Apex Code:

Map < String, Schema.SObjectType > globalDescription = Schema.getGlobalDescribe();

if ( globalDescription.containsKey( 'ActionCadence' ) ) {
    
    System.debug(
        'Sales Engagement is enabled.'
    );
    
} else {
    
    
    System.debug(
        'Sales Engagement is not enabled.'
    );
    
}

Leave a Reply