You need to sign in to do that
Don't have an account?
Staci Gregory
Trigger a Priority update on overdue activities
I'm VERY new to Apex (literally all coding) and am trying to figure out how to update the Priority to High on an activity after it has become overdue by 10 days.
The Priority field update is the only thing that I need to happen and I cannot figure out what I'm missing. My alerts are both on line 3; unexpected token ':' and unexpected syntax: 'mismatched input':' expecting Semicolon.
Being pointed in the right direction would be greatly appreciated!
The Priority field update is the only thing that I need to happen and I cannot figure out what I'm missing. My alerts are both on line 3; unexpected token ':' and unexpected syntax: 'mismatched input':' expecting Semicolon.
Being pointed in the right direction would be greatly appreciated!
Try This code....Please mark as best anser if this solves your issue.
You may have to declare a date variable to set the -90 days for activity date such as:
Date Today = system.Today();
Date d1 = Today.addDays(-90);
Then use this variable declaration in your if statement like: t.ActivityDate = d1 && t.Status != 'Completed'
Shawn
All Answers
Try This code....Please mark as best anser if this solves your issue.
You may have to declare a date variable to set the -90 days for activity date such as:
Date Today = system.Today();
Date d1 = Today.addDays(-90);
Then use this variable declaration in your if statement like: t.ActivityDate = d1 && t.Status != 'Completed'
Shawn