SFDO-Community / declarative-lookup-rollup-summaries

Declarative Lookup Rollup Summaries (DLRS) is a community built and maintained Salesforce application that allows you to create cross object roll-ups declaratively - no code! For install instructions and documentation, visit our website https://sfdo-community-sprints.github.io/DLRS-Documentation/
https://sfdo-community-sprints.github.io/DLRS-Documentation/
BSD 3-Clause "New" or "Revised" License
689 stars 235 forks source link

Adding a date value to realatiuonship criteria #821

Closed thinkconor closed 4 years ago

thinkconor commented 5 years ago

Scheduled job 'rollup_m000f000000bmTs' threw unhandled exception.

caused by: dlrs.RollupServiceException: A calculate job for rollup 'Reservation amount paid' is already executing. If you suspect it is not aleady running try clearing the applicable record from the Lookup Rollup Calculate Jobs tab and try again.

Class.dlrs.RollupService.checkJobAlreadyRunning: line 639, column 1 Class.dlrs.RollupService.runJobToCalculate: line 97, column 1 Class.dlrs.RollupCalculateJobSchedulable.execute: line 11, column 1

Before our consultant left, she thought this error might be caused by the query timing out in searching all the opportunities (85,000) in our instance.

The current Relationship Criteria is: opportunity.StageName = 'Posted' AND (opportunity.type = 'Guesthouse retreat' OR opportunity.type = 'Emery House retreat’)

Im trying to change this so it would only look at Opportunities modified Today().

opportunity.LastModifiedDate = 'Today()' AND opportunity.StageName = 'Posted' AND (opportunity.type = 'Guesthouse retreat' OR opportunity.type = 'Emery House retreat’)

I'm having no luck! Would you have any advise on how I could fix this?

Thanks

JimBTek commented 5 years ago

I am guessing you are doing a nightly Schedule Calculate? Look at the docs for switching to realtime or a delayed scheduled job. this only recalcs when the records are actually changed. You could also use Process Builder to the same effect

thinkconor commented 5 years ago

Hi Jim, Thanks, but it is scheduled for realtime calculating. I hadn’t understood that this would then only be actual changes.

Might switching to process builder, or scheduled be a way to remove this?

Conor Byrne Director of Projects Society of Saint John the Evangelist 980 Memorial Dr, Cambridge MA 02138

www.SSJE.orghttp://www.SSJE.org

On May 10, 2019, at 3:38 PM, Jim Bartek notifications@github.com<mailto:notifications@github.com> wrote:

I am guessing you are doing a nightly Schedule Calculate? Look at the docs for switching to realtime or a delayed scheduled job. this only recalcs when the records are actually changed. You could also use Process Builder to the same effect

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/afawcett/declarative-lookup-rollup-summaries/issues/821#issuecomment-491312317, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMBEQT7TSWOYGWOJLXHIZ5DPUWCGPANCNFSM4HMA7DLQ.

JimBTek commented 5 years ago

also I believe you are writing your SOQL query with a Date Literal incorrectly, but it should not matter if it is realtime. i'd try the incremental schedule https://github.com/afawcett/declarative-lookup-rollup-summaries/wiki/What-you-need-to-know-about-Scheduling-Rollups

There are some salesforce limits if you have over 50,000 records you might have to look into. Good luck and please report back how you fix your issue to help the next person

thinkconor commented 5 years ago

Ok, thank you for your help.

Conor Byrne Director of Projects Society of Saint John the Evangelist 980 Memorial Dr, Cambridge MA 02138

www.SSJE.orghttp://www.SSJE.org

On May 10, 2019, at 3:54 PM, Jim Bartek notifications@github.com<mailto:notifications@github.com> wrote:

also I believe you are writing your SOQL query with a Date Literal incorrectly, but it should not matter if it is realtime. i'd try the incremental schedule https://github.com/afawcett/declarative-lookup-rollup-summaries/wiki/What-you-need-to-know-about-Scheduling-Rollups

There are some salesforce limits if you have over 50,000 records you might have to look into. Good luck and please report back how you fix your issue to help the next person

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/afawcett/declarative-lookup-rollup-summaries/issues/821#issuecomment-491318102, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMBEQT4K6YIU5JW2KPPOCO3PUWECRANCNFSM4HMA7DLQ.

afawcett commented 4 years ago

@thinkconor let us know if you still want to chat and we can re-open for sure! 👍