• Gelu G.
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
Hello all,
Our Sales Cloud and Marketing Cloud are connected via the Marketing Cloud Connector.  I am trying to use the triggered send feature of Sales Cloud and send a Marketing Cloud email when a person account is created in the Sales Cloud.

I have the following trigger and test class set up on my Sandbox environment.
trigger Trig_Account on Account (after insert, after update) {
    if (!Test.isRunningTest()){
        et4ae5.triggerUtility.automate('Account');
    }
}

@isTest
private class Trig_AccountTest {
    static testMethod void myUnitTest() {
        Account testAccount = new Account(LastName = 'Test Account', PersonEmail= 'testclass@test.com');
        insert testAccount;
        testAccount = [select Id, LastName from Account where id = :testAccount.Id];
        System.assertEquals(testAccount.LastName, 'Test Account');
    }
}
The test class executes without any problems but the code coverage on the trigger remains at 50%(1/2).  I won't be able to deploy this to production because it needs to be at 75% at least.  I can't see what I am doing wrong here so any help will be apprecaited.
Hi,
We have person accounts enabled for our Salesforce instance.  I am using the Rest API to create an account record.  When an an account is created, there is formula field that gets calculated automatically to ge the long person contact id.  Is there a way to specifiy this attribute in the response?  I don't want to have to make a second call to get the long person contact id.