I have a 'date and time of event' field on Opportunities, and on the account I need to show the date of the next event and the date of the last event.
I think I need to use process and flow, with a loop to iterate through all the opportunities on the account but I don't know what steps I need to go through to get there. I'm guessing there needs to be a decision in there somewhere to identify which is the latest date but I don't know how to set it up.
I've found some documents online but I can't find anything to give me exactly what I need. I'm using the new Flow builder if it makes any difference.
3 respuestas
You can do this much more easily with Roll-Up summary fields (and maybe a process builder/workflow rule). I would add a checkbox field to your Opportunities to capture whether the "date and time of event" has passed. I would then add a process (or workflow) with a scheduled action that checks that box when the "date and time of event" has passed. You need to use a process here because a formula using date/time fields cannot be referenced in Roll-Up summary criteria.
Then, set up your Roll-Up Summary fields on the Account:
To grab the date of the next event, use something like this:
And to grab the date of the last event, use something like this: