0

I’m trying to do a roll-up summary type calculation on a lookup relationship.

I have a custom object called Call Report with a Lookup to Account. I want to get the “Latest Call Report Meeting Date” stamped on the Account. So for example:

Account A CR A – 20/11/2017 CR B – 29/11/2017

My “Roll-up” field should return “29/11/2017”. Is this possible with just config?

1

The standard recommendation for situations like this is to use Andrew Fawcett's Declarative Lookup Rollup Summary Tool.

That tool uses triggers (that the package, itself, creates) to do the actual "rollups", and provides a declarative interface (hence "declarative" in the name) for managing the rollups.

The only other option you'd have would be to write/manage your own triggers to do this.

| improve this answer | |
0

You can do so using a Workflow on the child object which will evaluate on creating or editing the record. In the rule criteria, give the condition as whenever Call Report Meeting Date has changed and is greater than your 'Roll-Up' field on Account, update that 'Roll-Up' field on Account with this current value.

| improve this answer | |
  • This is actually a good idea, I'll give it a shot. Thanks! – kknaguib Nov 30 '17 at 16:29
  • 1
    I would add that since Workflow/Process Builder isn't "bulkified" you may encounter Apex CPU time limit errors if you're bulk loading records. (i.e., Apex Data Loader) This is where Andy's DLRS tool has an advantage of being run in a scheduled batch job or real-time. (If you are bulk loading you may run into "unable to lock row" due to batches being processed in parallel. You can change from parallel to serial, reduce the batch size and/or sort the records based on their parent record to avoid having different child records (with the same parent) in different batches when using parallel mode.) – ClarkBranson Nov 30 '17 at 16:47
  • Process Builder is not bulkified, but workflows are. That's why I suggested only workflow. – Sagnik Chattopadhyay Dec 1 '17 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.