You need to sign in to do that
Don't have an account?
Mayur Tripathi
Hi I am trying to create a trigger on Account object that create a case for particular user (hardcoded userid)everytime a new Account created but nothing is coming in the case here is the code :
trigger DedupeReminder on Account (after update) {
for (Account acc: Trigger.New){
Case c = New Case();
c.subject ='Dedupe this Account';
c.OwnerId = '0057F000000tnLj';
c.AccountId = acc.Id;
insert c;
}
}
for (Account acc: Trigger.New){
Case c = New Case();
c.subject ='Dedupe this Account';
c.OwnerId = '0057F000000tnLj';
c.AccountId = acc.Id;
insert c;
}
}
use below trigger, it should be on after insert not
after updatei hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com
All Answers
You are using after Update in trigger event, so when you create record trigger will not fire, if you add after Insert it will work for you.
Best Regards,
Dayakar,D
use below trigger, it should be on after insert not
after updatei hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com