• Keith Gay
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I am new to apex so just trying my best. I know this is not right but this is what I am working with so far. Any insight would be greatly appreciated.

trigger channelpartner on Task (after insert) {
for (task t : Trigger.new) {
if(acct.channel_object != null){

Task tsk = new Task(),
accList.add(c.accountID)

t.channel_partner = acct.channel_object

tasks.add(tsk);}
}
insert tasks;
}
Our org uses a software to automatically create activity in SFDC. But this software does not allow for any type of relation to custom objects. So when the activity is created it is only attached to the account and contact but we have a third lookup on tasks for our custom object and can not for the life of me get this to autopopulate upon creation. I don't have much experience with triggers but from what I have researched seems like that may be the only option to get this done. Any help would be greatly appreciated. Thanks!
I am new to apex so just trying my best. I know this is not right but this is what I am working with so far. Any insight would be greatly appreciated.

trigger channelpartner on Task (after insert) {
for (task t : Trigger.new) {
if(acct.channel_object != null){

Task tsk = new Task(),
accList.add(c.accountID)

t.channel_partner = acct.channel_object

tasks.add(tsk);}
}
insert tasks;
}
Our org uses a software to automatically create activity in SFDC. But this software does not allow for any type of relation to custom objects. So when the activity is created it is only attached to the account and contact but we have a third lookup on tasks for our custom object and can not for the life of me get this to autopopulate upon creation. I don't have much experience with triggers but from what I have researched seems like that may be the only option to get this done. Any help would be greatly appreciated. Thanks!