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
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
Hi Amy,
You can achieve this functionality by creating a few calculated fields via Studio.
Meetings Module
date(ifElse(equal($status,"Held"),$date_start,""))
This formula checks to see if the status is held, and if so, inherits the start date of the meeting.
Accounts Module
maxRelatedDate($meetings,"meeting_held_date_c")
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!
hi Chris Raffle
Do you know of how to get the opposite, in other words instead of
maxRelatedDate get minRelatedDate
an example would be to calculate the earliest Opportunity Closed Won date for each customer.
.
CRM Business Consultant
Hi ,
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:
rollupConditionalMinDate($opportunities,"date_closed",createList("sales_status"),createList("Closed Won"))
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
I added the below formula to a calculated field in the Contacts module to fetch the earliest call date from the calls module. The formula works well but only if you add a new call to a contact. If there are calls already related, it doesnt populate the min call date in the Contacts module. Any idea where I'm going wrong or how to resolve this?
(rollupConditionalMinDate($calls,"date_start",createList(""),createList("")))
Hi Christopher Hart ,
Any time you add or modify a Sugar Logic formula, you need to run a 'recalculate values' action from the list view on the records you wish to have updated. Otherwise, existing records will not update with the calculation until they are saved or, in scenarios like yours, a new relationship is added before the parent record is saved.
Chris
Hi Christopher Hart ,
Any time you add or modify a Sugar Logic formula, you need to run a 'recalculate values' action from the list view on the records you wish to have updated. Otherwise, existing records will not update with the calculation until they are saved or, in scenarios like yours, a new relationship is added before the parent record is saved.
Chris