• lolly133
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi All

Have created this trigger to create a in opt in trial record when the opt in checkboxs are changed on the contact..
Have created this trigger on the contact record but it doesnt seem to do anything.. have gone through the debug logs and it is being stepped through but nothing happens.. any help would be much appreciated.


trigger CreateOptInTrail on Contact (after insert, after update){
    
    List <Opt_In_Trial__c> optToInsert = new List <Opt_In_Trial__c>();

        for (Contact c : Trigger.new){
        System.debug('Hello');

            if (c.Channel__c != null ){
System.debug('Hello123');
    Opt_In_Trial__c o = new Opt_In_Trial__c ();
    
    
        o.Contact__c = c.Id;
        o.Channel__c = c.Channel__c;System.debug('channel');
        o.Email_Opt_In__c = c.Email_Opt_In__c;System.debug('Email');
        o.Phone_Opt_In__c = c.Phone_Opt_In__c;System.debug('Phone');
        o.Post_Opt_In__c = c.Post_Opt_In__c;System.debug('Post');
        o.SMS_Opt_In__c = c.SMS_Opt_In__c;System.debug('SMS');
       

    optToInsert.add(o);
}

}

Hi All

 

I need some help creating a new custom task button to log a call. When i click this button i want to create a new task record and then when its saved return me to that saved task page.

 

At present when i save it returns me to the previous page i was on either the contact page or the home page. below is what i have at present

 

/00T/e?title=Call&who_id={!Contact.Id }&tsk5=Reactivation&saveURL=%2F{!Task.Id}&retURL=%2F{!Contact.Id}

 

From looking at all the previous posts this i think should be correct but not working! :-(

 

any help would be greatly appreciated

Hi All

Have created this trigger to create a in opt in trial record when the opt in checkboxs are changed on the contact..
Have created this trigger on the contact record but it doesnt seem to do anything.. have gone through the debug logs and it is being stepped through but nothing happens.. any help would be much appreciated.


trigger CreateOptInTrail on Contact (after insert, after update){
    
    List <Opt_In_Trial__c> optToInsert = new List <Opt_In_Trial__c>();

        for (Contact c : Trigger.new){
        System.debug('Hello');

            if (c.Channel__c != null ){
System.debug('Hello123');
    Opt_In_Trial__c o = new Opt_In_Trial__c ();
    
    
        o.Contact__c = c.Id;
        o.Channel__c = c.Channel__c;System.debug('channel');
        o.Email_Opt_In__c = c.Email_Opt_In__c;System.debug('Email');
        o.Phone_Opt_In__c = c.Phone_Opt_In__c;System.debug('Phone');
        o.Post_Opt_In__c = c.Post_Opt_In__c;System.debug('Post');
        o.SMS_Opt_In__c = c.SMS_Opt_In__c;System.debug('SMS');
       

    optToInsert.add(o);
}

}