You need to sign in to do that
Don't have an account?
Keith Gay
Help needed! Trying to make a trigger to update a custom field on task upon creation that reads a lookup field from the attached account.
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;
}
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;
}
As per my understanding, you are assigning task related account field(channel_object__c) in channel_partner__c .
Please use correct field API name and use following code it will help you.
Hope this helps you!
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
All Answers
As per my understanding, you are assigning task related account field(channel_object__c) in channel_partner__c .
Please use correct field API name and use following code it will help you.
Hope this helps you!
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com