Skip to main content

#DLRS SOQL토론 중인 항목 0개

Jesús Romo 님이 Commons Project: DLRS에 질문했습니다

Hi everyone, 

 

I'm inspecting our rollups and finding some DLRS calculations that I need help understanding a few things.  

 

My first question is: does a DLRS need to be active in order to run? I'm seeing that all of ours are not active, and the ones that are scheduled do not have a future schedule date. Does this mean they were somehow switched off and I just didn't know about it?  

 

My second question is: can you run DLRS referencing the fiscal year instead of the calendar year? Things like this fiscal year, last FY, FY 2 years ago…etc. If so, what's the notation for this? 

 

My third question: is it a problem if the "ID" part of one of the relationship criteria points to a single record in Salesforce? Or is this the notation for the DLRS updating only each single fund with it's respective children? Or something else? Here is the criteria for the DLRS in question, salesforce Id obfuscated with 'singleSFId': 

 

Amount__c != null 

 AND  

FmlStatus__c in ('Closed','Cancelled','Declined','Executed') 

AND  

FpApprovedDate__c = LAST_N_YEARS:2  

AND 

id = 'singleSFId' 

 

Thanks for your help, 

 

#Salesforce Developer #Flow #DLRS SOQL #DLRS

답변 4개
  1. 2025년 9월 29일 오후 10:12

    You can't move the scheduled Apex jobs from SB to Prod. You'll need to re-create them

0/9000

I would like to count tasks related to a lead, which is easy to do with DLRS. But I need to use a custom field that is on the Activity in order to filter the DLRS. Is that possible? #DLRS SOQL

답변 9개
0/9000

Hello Team,

As I am receiving system emails regarding the rollup summary job fails

So I have deactivated the roll up summary job by unchecking active checkbox on the custom meta data record. But Still the job is being run and receiving the job failure emails continuously.

1. How to stop the specific roll up summary job  ?

2. If we delete the DLRS configue record then related child trigger gets deleted      automatically ?

 

#DLRS SOQL #Delete Field Dlrs LookupRollupSummary #DLRS Field

 

Thanks,

Pavan Thammali.

답변 3개
  1. 2023년 3월 3일 오전 11:14

    @Pavan Thammali, Can you share a screenshot of the error message? Usually, we deactivate unwanted rollups on the rollup itself but it can be done via metadata as well. However, the schedule should get deleted manually if the rollup has been scheduled. Delete the entry manually if the rollup is referenced in the so-called 'Lookup Rollup Calculate Jobs' tab. Child triggers should get removed via the 'Manage Child Triggers' button on the next screen by clicking remove.

0/9000

I'm trying to create a DLRS for Account (Parent) and Event (Child). My relationship criteria concerning the Event object is intended to focus on 1 specific record type and only for those Events that were logged after the 1st October 2022.

 

Currently I put down: RecordTypeId = '0124J000000xlmuQAA' AND ActivityDate > 2022-10-01T00:00:00Z

 

However I'm receiving an error stating this: Relationship Criteria: Relationship Criteria 'RecordTypeId = '0124J000000xlmuQAA' AND ActivityDate > 2022-10-10T00:00:00Z' is not valid, see SOQL documentation http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_conditionexpression.htm, error is 'value of filter criterion for field 'ActivityDate' must be of type date and should not be enclosed in quotes'

 

Any ideas on how to resolve this as I'm unsure.

 

Cheers,

Saf

#Declarative Lookup Rollup Summaries #DLRS SOQL #SOQL Queries

답변 5개
  1. Steven Trumble (Strum Consulting) Forum Ambassador
    2023년 3월 7일 오전 11:48
    'RecordTypeId = '0124J000000xlmuQAA' AND ActivityDate > 2022-10-10
0/9000

I have a need that can't be done with a standard rollup summary field, so I'm trying this with DLRS.

 

We have a managed package that includes a single object for two sets of records: parent and child. 

 

The differentiator is record type; there are only two, Farm (parent) and Turbine (child). 

However, the child has a lookup (Parent_Location__c) to the Parent, so this is the relationship field. Naturally, it is blank on Parent records. 

 

I have set up the Relationship Field to: Parent_Location__c

 

Now is my question - Relationship Criteria:

 

Is the Relationship Criteria:

 

Parent_Location__r.RecordType.DeveloperName='Turbine'

 

Relationship Criteria Fields are:

RecordType

Parent_Location__c

 

Field to Aggregate = Id because it should count all child records.

 

Aggregate Operation = Count

 

I may not even need to reference the Record Type considering all records that should be counted will have a Parent record in the Parent_Location__c field. 

 

I have not activated this yet. I am in a sandbox, but would rather get it right the first time. 

 

Would love some advice. 

 

Thanks,

 

#DLRS SOQL

답변 15개
  1. 2023년 1월 25일 오후 6:05

    I settled on the following, and it worked! All Turbine records have a value in the FX5__Parent_Location__c field, but the Parent does not have a value, of course. So I figured it was worth a try. 

     

    Granted, I still list the RecordTypeId in the Relationship Criteria Fields section, but not sure if it's even needed since it's not included in the Relationship Criteria. 

     

    I settled on the following, and it worked! All Turbine records have a value in the FX5__Parent_Location__c field, but the Parent does not have a value, of course. So I figured it was worth a try.

0/9000

Hi there,

We've developed a flow that creates child records of a record based on whether it meets certain criteria. Up to 50 child records can be created, but usually average is around 5-10.

 

We have approximately 30 DLRS that roll up from the child record to 3 different parent records. 

We are encountering DLRS SOQL errors, and the reason why we think it's DLRS is because our flow errors out, but when we updated the DLRS to scheduled, then the flow successfully ran. 

 

Flow jobs are bulkified so it's not an error with the flow. We also have filters on the DLRS so that none of them should run when the flow is completed. However, what we're seeing here and what I've seen on another project, is that even though there is a filter specified, any inserts or updates to the records will cause DLRS to re-calculate, even if they record does not meet filter criteria (but it will be ignored in the calculations) 

 

Has anyone experienced this before and any workarounds to make our process scalable?

댓글 2개
0/9000

I have a quick DLRS SOQL question: How do you search for a word using a contains function (or something similar) in the relationship criteria. I'm trying to rollup the most recent email date by searching for the word "Email:" in the Subject field. This criteria doesn't seem to be working and it was all i could find when i goggled this: Subject LIKE '%Email:%' 

댓글 11개
  1. 2020년 2월 18일 오후 10:18
    Yeah I did. And that's what I wanted anyways since the Due Date was filled out 100% of the time whereas completed was not. At any rate I figured out a workaround by creating a formula field on tasks called "Email?" That basically returned yes or no if the subject contained "Email" - which made up for not being able to query that with the LIKE '%Email%' criteria.
0/9000