Hi,
Thank you for your query.
As per my understanding, this is a hard problem.
If you add a two-options field on the Activity, it is almost impossible to update (toggle) this using a workflow / flow or even a plugin. You cannot trigger any process or plugin on the activity table.
If you add this flag in underlined activity (like Task, Phone Call, Email, etc.), you cannot role it up on Activity Level.
So my suggestion would be:
- Instead of using Roll-up, write your own logic using a plugin.
- Let this plugin execute on create/update of:
- Task
- Phone Call
- Email
- Appointment
(or whatever activities are being used)
- Get reference of Regarding Account.
- Retrieve Multiple - All Activities related to this account and get the Last and Next activity date (aggregations).
- Update these fields on Account (simple fields not roll-up).