You need to sign in to do that
Don't have an account?
symantecAP
Trigger on Account
Hi All
I have a check box field on Account Object which becomes True When there is Activity History present.
I have to write a Trigger on Account which updates the checkbox field when there is Activity History.
Kindly help
Here it is
trigger activity on Account (before insert,before update) {
for (Account a: trigger.new){
if (a.lastactivitydate==null)
{
a.HasActivityHistory__c =true;
}
}
}
Hi,
your trigger should be like this:
trigger activity on Account (before insert,before update)
{
for (Account a: trigger.new)
{
if (a.lastactivitydate!=null)
{
a.AshishPackage__ActivityChk__c =true;
}
}
}
My suggestion is that you should write a trigger on activity (task and event) instead of Account.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.