SFDO-Community/declarative-lookup-rollup-summaries

Calculate new roll up failing on "The rollup must be Active before you can run a Calculate job"

astehman-summa opened this issue · 6 comments

OK I've tried poking around to find this answer and not having much luck.

I created a new rollup on a self-referencing object (parent/child) where the parent value rolls up values on its children.

I then tried to run calculate, like the instructions say to do, to backfill existing records.

But when I did, I got that error.
dlrs_error_calculate_job_rollup_must_be_active

As a note, I attempted to run it again, just to see what would happen, after unsuccessfully poking around for answers and looking for something to activate. Oddly, I got the error that it was already executing:

dlrs_error_calculate_job_rollup_second_attempt_alreadyrunning

@astehman-summa Are you running the latest release v2.9? Can you check the Calculate Rollup Jobs tab to see if you have a record for your rollup? If there is a record still present and your calculate job is not running (see Apex Jobs under Setup) then delete it. Let me know though, since my expectation is that the Calculate Jobs record should be deleted automatically.

Hi Andy,

I went through the standard interface via "Lookup Rollup Summaries" and just re-created the rollup. That worked. I was using 2.9 which is what was available from the link on github.

Following these instructions, there was a Lookup Rollup Calculate Job, and yes nothing was running, just one job completed last night (technically) which was likely the one from this most recently created roll up.

So now I have one rollup under "Lookup Rollup Summaries" (Subproject Value Rollup) which **does work ** and one under "Manage Lookup Rollup Summaries - Custom Metadata Pilot" (Project Value) that does not work.

I am sticking with the non-pilot tab for now. Any other advice?

Ok, this could be a bug then, can you confirm if the remaining record in the Calculate Job is for the Manage Lookup Rollup Summaries defined rollup?

So i have found a bug, that if you attempt to run Calculate on a Custom Metadata or Custom Object based rollup and it is not active, you get the above error message in your first post. Which is correct, but...

It leaves a rollup job record, which needs deleting manually before you can try again (after ticking the Active checkbox on the record). I've done some more testing and the record does get deleted after the job completes. So i will leave this open for the initial press of Calculate button when a rollup is not Active scenario...

If you could at some point delete the job record and try your custom metadata based rollup again and tell me if your results match, in that the calc job record should be deleted.

Fixed in v2.10