• Fitsum Worku 5
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,
I have created a trigger that will be used by the marketing cloud connector for trigger sends.  The trigger is as follows:
trigger Trig_Account on Account (after insert, after update) {
    et4ae5.triggerUtility.automate('Account');
}
The test class for this trigger is:
 
@isTest
private class Trig_AccountTest {
static testMethod void myUnitTest() {
Account testAccount = new Account(RecordTypeId = '012c00000009EzV', LastName = 'Test Contact', PersonEmail = 'de123@yahoo.com');
insert testAccount;
testAccount = [select Id, LastName from Account where id = :testAccount.Id];
System.assertEquals(testAccount.LastName, 'Test Contact');
    }
}
When executing the test, I keep getting the error below.  It's a simple test and it's not obvious to me what could be missing.  
 
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Trig_Account: execution of AfterInsert

caused by: et4ae5.MCBaseException.InvalidParameterException: Whoops! Marketing Cloud Connect does not have access to the selected object. Contact your administrator to enable objects for Marketing Cloud Connect triggered sends.

Class.et4ae5.triggerUtility.automate: line 11, column 1
Trigger.Trig_Account: line 2, column 1: []