SFDO-Community/declarative-lookup-rollup-summaries

Nightly Scheduled RollupJob running, but Summaries not updating

JimBTek opened this issue · 13 comments

I followed the instructions in this blog post to schedule my Summaries Nightly.

I have 2 summaries. Each are set to Active, set to Scheduled, and have the child triggers deployed. Previously they worked as realtime. When i changed to scheduled i removed and re-deployed the child triggers (What causes the trigger to change/need re-dploying?).

I then scheduled the RollupJob to run nightly, and I can see that it ran. But neither rollup summary actually did anything. Lookup Rollup Summary Logs is empty, and there are no records under Lookup Rollup Summary Schedule Items on either summary.

Is there a missing step from the blog post instructions, @afawcett? Do I need to also schedule each summary? I am documenting w/ screenshots as I go for the wiki as well.

in testing one time when I did manual Calculate it ran without fail, but did not update the summary fields. I remove child trigger, tried manual calc, failed, deployed child trigger, ran, it worked, and it summarized correctly.....

also trying to test without waiting for an hour I've been trying to do:

RollupJob p = new RollupJob();
        String sch = '0 0 12 45 * ?';
        system.schedule('RollupJob Nightly', sch, p);

but it says "Invalid type: RollupJob"

jobs screenshot. You can see the RollupJob runs, but does nothing (no batches), while the manual Compute runs 17 batches. The 17 batches is just one of the two summaries that I manually ran.

Nevermind, I reread this issue for the answer. I did not have any records showing up on Lookup Rollup Summary Schedule Items. I will be adding to the wiki!

Yeah as soon as you change child records in a way that effects the rollup, you should see records appear in the Lookup Rollup Summary Schedule Items ready to be processed.

As regards your code above, you'll need the namespace prefix on the class / type...

dlrs.RollupJob p = new dlrs.RollupJob();
String sch = '0 0 12 45 * ?';
system.schedule('RollupJob Nightly', sch, p);

Great thanks. Ill add to the FAQ "How can i test the rollupjob?"

On Saturday, March 28, 2015, Andrew Fawcett notifications@github.com
wrote:

As regards your code above, you'll need the namespace prefix on the class
/ type...

dlrs.RollupJob p = new dlrs.RollupJob();
String sch = '0 0 12 45 * ?';
system.schedule('RollupJob Nightly', sch, p);


Reply to this email directly or view it on GitHub
#142 (comment)
.

Best,

Jim Bartek
BTek Ventures, LLC
317-292-6301
BTekVentures.com

Hey all,

If the field that is being aggregated is a cross-object formula, is there any way to force a "full" re-calculation of the rollup on a nightly basis? Before I started to dig into code, I wanted to see if you guys had any ideas how to accomplish this.

Thanks.

Yeah I am interested in this and had a comment on #145 about possibly scheduling RollupCalculateJob instead of scheduling RollupJob but I guess you'd have to pass which job to run???

Good idea @wes1278 marking as enhancement.

Wow that is awesome.

On Sunday, November 29, 2015, Andrew Fawcett notifications@github.com
wrote:

Closed #142
#142
.


Reply to this email directly or view it on GitHub
#142 (comment)
.

Best,

Jim Bartek
BTek Ventures, LLC
317-292-6301
BTekVentures.com

Hi Andrew, this is great. Do you need the trigger installed to run the Schedule Calculate?

No.