In the Accounts module I want to add a Date of last meeting field and have it auto populate. Is there a way to have it locate the last meeting held and put the date of that meeting in the field? Thanks so much
You can achieve this functionality by creating a few calculated fields via Studio.
This formula checks to see if the status is held, and if so, inherits the start date of the meeting.
This formula reviews all related meetings to the account to return the highest date value in the previously created custom field.
Once both fields are created, any meetings saved will populate the custom field if their status is held. Similarly, any accounts saved will populate the highest related date from the custom field.
Any pre-existing records will be empty. To remedy that issue, you will need to perform 1 of the following operations on the existing leads:
I hope this helps!
Please note that due to bug #76484 there's no 'Recalculate Values' option in the Meetings list view mass action dropdown.
As a work-around you can do a Mass Update and update the Tags with an empty value (make sure to select the "Append Tag(s)" checkbox in order to not whipe out existing Tags).
Hi Vincent Amari,
There is a Sugar Logic function that achieves this use case called rollupConditionalMinDate. I'm not sure on when this was introduced as it doesn't appear to be in the documentation for Sugar 12. I confirmed it is in Sugar 11; it may be available in earlier releases. On the Accounts module, I created a date field with the following formula:
After adding the field, I then recalculated values on the account records and confirmed that the earliest closed date of an account's won opportunities populates as expected.
hi Chris Raffle
Thank you very much for that, I had totally missed that rollupConditionalMinDate existed, as I expected minRelatedDate to exist.
Conversely, rollupConditionalMaxDate doesn't exist either
In case it helps I can also confirm for anyone else wondering, rollupConditionalMinDate exists in v10 onwards.
CRM Business Consultant