People who code: we want your input. Take the Survey

Hot answers tagged

3

SOQL doesn't currently support comparing two fields, but it's coming soon (Safe Harbor applies). For now, if you want something like that to work, you need to create a custom formula, such as: Same Parent Date (Checkbox) = SomeDate__c = Parent__r.SomeDate__c And from there, in DLRS, you would say something like: Same_Parent_Date__c = true


3

The DLRS-autogenerated test classes look like this (I copied one of mine that is on OrderItem: /** * Auto Generated and Deployed by the Declarative Lookup Rollup Summaries Tool package (dlrs) **/ @IsTest private class dlrs_OrderItemTest { @IsTest private static void testTrigger() { // Force the dlrs_OrderItemTrigger to be invoked, ...


3

Go to your Lookup Rollup Summary tab and look at all records. For every record, you want to make sure that all of the following API Names are correct: Parent Object Child Object Relationship Field Field to Aggregate Aggregate Result Field (Optional) Field to Order By You could try to run the following script in Execute Anonymous and see if it catches the ...


3

You need to first click on Manage Lookup rollup Summaries tab and then select the lookup rollup summary which you want to schedule. Afterwards, you need to click on the "Schedule Calculate" button. After clicking, a new page will open which looks like this: Here, you need to fill the schedule details and then click on "Schedule Recurring Calculate Job", ...


2

I'm not certain (I don't have a DLRS org handy to test on), but I think the source of this issue is that CallDurationInSeconds is one of the handful of standard fields that have the underlying type int (see the SOAP Reference). You can't create custom fields of that type; your custom number fields are of type double, regardless of their precision/scale and ...


2

This is really two questions, but one of them is very simple, so let's get that out of the way quickly. it does print that it has been added to the campaign but when I go and check the campaign, nothing shows up That's because you don't perform an insert DML to persist your CampaignMember records to the database. You'll want to do this in a bulkified way,...


2

The error is telling you that you appear to be using the Declarative Roll-up Summary Tool from Financial Force and also using multiple currencies. You must be doing a roll-up on something where the currency type varies or else are trying to roll up that object. I suspect the message is telling you that you can't do a roll-up on a field where the currency ...


2

You'll need to use single quotes and make sure that your parentheses are balanced. You can also express this much more simply using IN: Encounter_Subtype__c IN ( 'ANGER MANAGEMENT', 'FINANCIAL FITNESS', 'PNP', 'RECOVERY 101', 'RELAPSE PREVENTS' ) DLRS relationship criteria are SOQL, not Salesforce formulas, so the SOQL and SOSL Reference is where you ...


2

Your Relationship Criteria shouldn't include an aggregate operation. Define your aggregation with the Field to Aggregate and Aggregate Operation fields on your rollup summary definition. If you're trying to find the maximum amount represented on a child object, you want the Aggregate Operation "Max" and the Field to Aggregate cv_Amount__c. This field must ...


2

For the dev console error, it might have to do with the naming of your Apex class. Is there already a class with that name? Does the class name mismatch the filename? And maybe don't give the method the same name as the class. If you look at the DLRS code you can maybe get a hint of what is going on: https://github.com/afawcett/declarative-lookup-rollup-...


1

The field name is ParentId. That's your main hurdle so far. The other problem you will encounter if I understand your requirements correctly is that you cannot compare a field to another field in SOQL. You'll need to create a checkbox formula that looks like: Customer_Name__c = ParentId Then filter on MyCheckbox__c = true instead of your current filter.


1

Consider the following situation: A Lead is coming with Partner_Number__c = '123' ('123' != null). If you do not have Partner__c record with such Partner_Number_Copy__c then mapIdByPartner.get(l.Partner_Number__c) will return null and it obviously has no Id. So you might want to modify your code as follows : if(l.Partner_Number__c != null && ...


Only top voted, non community-wiki answers of a minimum length are eligible