You need to sign in to do that
Don't have an account?
Naitik Rai
i want to update priority on activity(overdue)
I'm total new to Apex (specially in coding) and trying to figure out, to update the Priority to be High on an activity
after it has become overdue by 10 days.
The Priority field update is the only thing that I need to set and I cannot figure out what I'm doing wrong.
My error is both on line 3; unexpected token ':' and unexpected syntax: 'mismatched input':' expecting Semicolon.
Any help would be greatly appreciated!
after it has become overdue by 10 days.
The Priority field update is the only thing that I need to set and I cannot figure out what I'm doing wrong.
My error is both on line 3; unexpected token ':' and unexpected syntax: 'mismatched input':' expecting Semicolon.
Any help would be greatly appreciated!
Try This Piece of code,
You need to declare a date variable to set the -90 days for activity date such as:
Date Today = system.Today();
Date dt = Today.addDays(-90);
Then Please use this variable declaration in your if statement like:
t.ActivityDate = dt && t.Status != 'Completed'
& Please mark this answer as best answer if this solves your issue.
All Answers
Try This Piece of code,
You need to declare a date variable to set the -90 days for activity date such as:
Date Today = system.Today();
Date dt = Today.addDays(-90);
Then Please use this variable declaration in your if statement like:
t.ActivityDate = dt && t.Status != 'Completed'
& Please mark this answer as best answer if this solves your issue.