Loading
Using Cross-Cloud Products with Marketing Cloud Engagement
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Testing an Object Trigger Before Sending

          Testing an Object Trigger Before Sending

          Before sending a triggered email through Marketing Cloud Connect for Marketing Cloud Engagement, use a test script. Repeat the script for each object with a trigger setup. Ensure that the object’s defined properties account for all required properties on an object.

          This example script checks the Contact object, where LastName='TestExample'.

          {
          
            private static testmethod void ContactTriggerTest()
          
            {     
          
                     insert new et4ae5__Configuration__c(et4ae5__Support_Ticket_Recipient__c = 'example@example.com');
          
                     Test.startTest();
          
                     Contact c = new Contact(LastName='TestExample');
          
                     // Insert contact
          
                     insert c;
          
                     // If no exceptions occurred, it was successful 
          
                     System.assert(!String.isBlank(c.Id));
          
                     Test.stopTest();
          
            }
          
          }
          
           
          Loading
          Salesforce Help | Article