• Vicky Dabrowski
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
I'm trying to calcualate the total number based on fields that have the same name.  I have two objects - Presentaions & Junctions.  The purpose is to track the quantity of particular files downloaded.  Each record in the Presentaion object reflects one file.  The Junction object tracks each time the file has been downloaded and the date.  Each like file has the same file name.  The Junction object has a lookup field to Presentations. I also created a lookup field from Presentations to Juntions so that I can access the Junctions fields. 

I have a field on the Presentation object called Total Times Downloaded.  How can I add up the total times each Junction record with the same name and populate the number in the Total Times Downloaded field?

Junction Object
Field = Junction Name
Presentation 1
Presentation 1
Presentation 1
Presentation 2
Presentation 2

Presentation Object
Presentation 1         Total Times Downloaded = 3
Presentation 2         Total Times Downloaded = 2

Thanks for any help.
Hi Everyone,

I'm trying to set up email triggered sends through Marketing Cloud via the Salesforce integration.  I'm having trouble setting up the Apex Class and the Apex Trigger for Campaign Members. 

Here is an Apex class that I deployed for the lead:

@isTest
private class Trig_LeadTest {

    static testMethod void myUnitTest() {
        // TO DO: implement unit test
        Lead testLead = new Lead(LastName = 'Test Lead', Email = 'help@marketing.com', Company = 'Test Lead');
        insert testLead;
        testLead = [select Id, LastName from Lead where id = :testLead.Id];
        System.assertEquals(testLead.LastName, 'Test Lead');
    }
}

I'm trying to accomplish the same thing, but for the Campaign Member object.  Could anyone assist in what the Apex Class and Apex Trigger code needs to be for Campaign Members?

Thanks!
Vicky
Hi Everyone,

I'm trying to set up email triggered sends through Marketing Cloud via the Salesforce integration.  I'm having trouble setting up the Apex Class and the Apex Trigger for Campaign Members. 

Here is an Apex class that I deployed for the lead:

@isTest
private class Trig_LeadTest {

    static testMethod void myUnitTest() {
        // TO DO: implement unit test
        Lead testLead = new Lead(LastName = 'Test Lead', Email = 'help@marketing.com', Company = 'Test Lead');
        insert testLead;
        testLead = [select Id, LastName from Lead where id = :testLead.Id];
        System.assertEquals(testLead.LastName, 'Test Lead');
    }
}

I'm trying to accomplish the same thing, but for the Campaign Member object.  Could anyone assist in what the Apex Class and Apex Trigger code needs to be for Campaign Members?

Thanks!
Vicky
I need a trigger to send an email from SF to Exact Target using the integration.  The documentation for the integration provides the following code for the trigger- but it is wrong, or at least can't get it to save.
Object Name.trigger Trig_Object Name on Object Name (after insert, after update) {
et4ae5.triggerUtility.automate('Object Name'); }
For example:
trigger Trig_Lead on Lead (after insert, after update) {
et4ae5.triggerUtility.automate('Lead');}
This will be on the Contact object for a "Consumer" RT, so I think I need to have it be something like this:
 trigger Trig_Contact on Contact (after insert, after update) {
    for(Contact consumer : Trigger.new) {
    if (consumer.Type == 'Consumer')
    {et4ae5.triggerUtility.automate('Contact');
}}}
Do I need the for loop?   
The use case is when a new Contact is created with a WFR to send an acknowledging email to the Contact (for a warranty registration).
This is my first crack at writing a trigger, I'm the Admin.  I haven't seen how to use something like et4ae5.triggerUtility.automate. 
Thanks.