Andy in the Cloud

From BBC Basic to Force.com and beyond…

About

I started this blog to share some thoughts, ideas and opinions around my main passion in life computing, or more specifically these days Cloud computing. Who knows maybe I’ll go stray now and again into some of my others as well!

I am currently working for Salesforce.com in Product Management for the Platform. Previously FinancialForce.com CTO. Enjoying working and at times coding hard with everyone to make this new startup company a raging success! Along with our friends at Salesforce.com and UNIT4. I am pleased to have been selected as a Force.com MVP!

I am a Salesforce MVP. For more information on the Salesforce MVP community, visit: http://www.salesforce.com/mvp/. Salesforce, Force, Force.com, Chatter, and others are trademarks of salesforce.com, inc. and are used here with permission.

Any views expressed on this blog are entirely my own.

forcedotcom-mvp

266 thoughts on “About

  1. Salesforce is doing a Critical Update for Winter 21 Release:

    We want to take this opportunity to remind you that we are enforcing the ‘Restrict Access to @AuraEnabled Apex Methods for Guest and Portal Users’ and the ‘Restrict Access to @AuraEnabled Apex Methods for Authenticated Users Based on User Profile’ Release Updates in the Winter ‘21 release.

    Does your installed package have @Auraenabled Classes that i would need to add to profiles?

  2. Hello Andrew,

    I am having an issue with DLRS. I posted on the community chatter group but I did not receive any responses yet. The issue is as under. Can you please help. Thanks a lot.

    I created a Roll up summary to count the number of contact roles on an Opportunity using DLRS. [Parent: Opportunity, Child: OpportunityContactrole, Relationship field: OpportunityId, FieldtoAggtregate: ID]

    I selected the calculation more as scheduled and it calculated the values correctly.But now when I add a new contact role to opportunity it gives me the following error

    dlrs_OpportunityContactRoleTrigger : dlrs_OpportunityContactRoleTrigger: execution of AfterInsert caused by: System.QueryException: Grouped field should not be aggregated: OpportunityId Class.dlrs.LREngine.QueryExecutor.query: line 662, column 1 Class.dlrs.LREngine.WithSharingQueryExecutor.query: line 671, column 1 Class.dlrs.LREngine.rollUp: line 238, column 1 Class.dlrs.LREngine.rollUp: line 117, column 1 Class.dlrs.RollupService.updateMasterRollupsTrigger: line 1035, column 1 Class.dlrs.RollupService.handleRollups: line 919, column 1 Class.dlrs.RollupService.triggerHandler: line 311, column 1 Trigger.dlrs_OpportunityContactRoleTrigger: line 7, column 1

    • It should not be running the query realtime for Schedule mode – have you perhaps got another rollup definition lurking somewhere else?

  3. Hi Andrew,

    Many thanks for this tool (though in all honesty, thanks is too small a word to describe my gratitude).
    I recently modified the relationship criteria of an existing rollup to add an OR condition.
    When I run a full calculate on this revised rollup the batch completes successfully, but doesn’t pickup any records, so its like a false positive.
    Can you please advise why this could be happening

    Regards

    • For full calculate you need to put your criteria in on the screen when you press the button. The criteria on the rollup definition is not used for full schedule rollups.

  4. I created some DLRS while I was in Classic, but I can’t see or edit them in Lightning. Do I need to delete them and re-create them in Lightning?

    • No they will exist – the Lightning App however does not by default show the “Declarative Rollup Summary” tab – you will need to add this to your profile or a permission set assigned to your user. Then search for the tab in the laucher or add the tab to the rollup app.

  5. Hi Andrew,
    We have created many DLRS fields to update data for lookup relationships. These are defined as real-time. However when the “child” record is created or edited the fields on the “parent” object are not consistently updated. Any insight you can provide would be greatly appreciated since the data is critical to the proper flow of a major upgrade to out current applications.

    • Rollups are calculated on insert and delete of a child record – when updating a child – only field changes to fields referenced on the rollup definition are monitored. Check “Relationship Fields” field.

  6. Pingback: Awesome Salesforce – Massive Collection of Resources – You Ever Wondered To Get – Learn Practice & Share

  7. Hello Andrew, Salesforce has released new updates which impact the existing components of managed packages. As c3HealthcareRX is using Declarative Lookup Rollup Summaries Tool which is a managed package, there may be impact on the components used. Please could you confirm is there any impact on functionality if we activate the critical updates ?
    https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_lc_secure_static_resources_update.htm
    https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_forcecom_flow_mgmnt_access_legacy_actions_cruc.htm
    https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_lc_apex_methods_packages_cruc.htm
    https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_lc_enforce_prop_modifiers_cruc.htm

  8. Hi Andrew. We have been using DLRS for a while now and it’s been working fantastically. Until a week or so ago. I have recently had to edit all of our US and Canada State/Country Integration values. Previously they were, for example, United States. I recently changed them to match ISO coding, i.e US.

    Since making these changes, some records are not able to be saved, giving me error messages such as: “There’s a problem with this country, even though it may appear correct. Please select a country from the list of valid countries.”
    Or
    Mismatched integration value and ISO code for field

    After chatting with the Salesforce Support team, and doing some of my own digging, it seems that the DLRS_AccountTrigger, ContactTrigger, and Opportunity Trigger apex triggers are causing the problem. Disabling them in my sandbox solves the issue.

    I’m wondering, why would those DLRS triggers be interfering with my state/country integration values? Have you come across this? And if so, is there a workaround?

    Thanks so much.

    Max

    • My guess is it could be one of the rollup rules is rolling up a field with an old country picklist value in it maybe? Go through your rollup rules for these objects and see if thats the case. And if you have any old records with picklist values that are no longer valid. And also does it still fail for brand new records?

  9. Hello Andy,

    I’m hoping you can help with an issue that SF Support is troubleshooting for us at Guiding Eyes for the Blind. The issue has been sent to tier 3 and they have sent this request –

    The error that is thrown in the flow in coming from the apex classes that are part of the managed package.

    The managed package: ” Declarative Lookup Rollup Summaries Tool (Managed)”.

    If you are not the vendor of the managed package please get written consent from the vendor the managed package to enable the debug logs in order to find out the point of the error.

    Are you the correct person to give this permission or can you tell me who is. Thanks in advance for your help.

    Judi

    • I am a key originating author of this tool yes. However it is reallly supported by a great community and when i can myself. Please check out the readme file in the tools github repo for a link to the chatter community group.

  10. I am trying to schedule DLRS apex job Rollup summaries and keep getting the error “Error: You must select an Apex class that has a parameterless constructor” I have not deleted the old schedule that is under an Admin ID. please advise.

    • You have to use the Schedule button on your rollup definition if this is a full recalc you want. The other way is the incremental reschedule path. Check out the wiki on the repo for a great article that covers the differences.

  11. Issue: When changing the status of any opportunity everyone gets an error:

    Error:Apex trigger dlrs_OpportunityTrigger caused an unexpected exception, contact your administrator: dlrs_OpportunityTrigger: execution of AfterUpdate caused by: System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Class.dlrs.LREngine.rollUp: line 210, column 1

    ============
    Debug logs analysis shows that the error is occuring due to a non selective query from the Managed package code:

    11:13:55.1 (320966640)|ENTERING_MANAGED_PKG|dlrs
    11:13:55.1 (322368972)|SOQL_EXECUTE_BEGIN|[210]|Aggregations:0|SELECT CampaignId, Sum(Marge_2016__c) lre0 FROM Opportunity WHERE CampaignId in :masterIds AND IsWon = true GROUP BY CampaignId
    11:13:58.55 (3055899789)|METHOD_EXIT|[7]|01p24000007K7Dz|dlrs.RollupService.triggerHandler()
    11:13:58.55 (3056161207)|FATAL_ERROR|System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
    Even if a field is indexed a filter might still not be selective when:
    1. The filter value includes null (for instance binding with a list that contains null)
    2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)

    Class.dlrs.LREngine.rollUp: line 210, column 1
    Class.dlrs.LREngine.rollUp: line 105, column 1
    Class.dlrs.RollupService.updateMasterRollupsTrigger: line 580, column 1
    Class.dlrs.RollupService.triggerHandler: line 318, column 1
    Trigger.dlrs_OpportunityTrigger: line 7, column 1

    =========

    Query causing the issue: SELECT CampaignId, Sum(Marge_2016__c) lre0 FROM Opportunity WHERE CampaignId in :masterIds AND IsWon = true GROUP BY CampaignId

    ============

    Resolution: The query needs to be optimized to make it selective. This should be looked into by the managed package provider.

    Salesforce supports custom indexes except for multi-select picklists, text areas (long), text areas (rich), non-deterministic formula fields, and encrypted text fields.

    “IsWon” is a non-deterministic formula field hence an index can’t be created.

    • Yes unfortunately the tool is still subject to these kind of limits per the readme file. Take a look at the scheduling modes wiki page – maybe you need to flip to partial or full scheduled recalcs – likely full. Also it looks then like this parent has lot of children, normally Salesforce recommend max of 10k. The other thing is if your updating a lot of Campaigns (child records at once) then maybe you can flip to the incremental scheduled mode and reduce the scope size (via the tools custom setting). Finally another option is maybe to constrain things further by a date and/or perhaps have an actually Boolean field for isWon for records and update that via a trigger or flow. You would then of course have to get such a field updated for all your historic records keep in mind. So hopefully a few ideas among this response for you. In the end the tool is working within the limitations of the platform unfortunately. Oh and finally have you tried the community chatter group for the tool see what thoughts others have? That is linked on the readme for the tools. Good luck and take care! 👍🏻

  12. Hi, Andy,
    Big fan of Lightning File Explorer. Trying to install the unmanaged code so I can make a couple of changes, but our developer hit a problem he describes here:
    “the package conflicts with an SF critical update from August 2020 – You can now only initiate Apex classes that have a no-arguments constructor that is visible to the code running Type.newInstance. This will result in the code needing to be rewritten, even if we can successfully get it deployed.”

    Is there any chance there is updated code out there that overcomes this?

    One of the reasons I need to make changes is that I’m using Communities, and need the ability to have guest users upload files. But I can’t add guest users to the Permission Set, so every file upload fails.
    Any ideas on how to get past this?
    Thanks again for a great app!
    Chris

    • Hello – thanks for posting – unfortunately I am not the owner of that tool – have you got the correct site?

  13. Hello Andrew, two weeks ago I left a comment on this site about a problem we are experiencing with a package you created. I didn’t see a reply of you yet, is that correct. Can you please take a look at the message. For your convenience, I’ll paste it again below this message.

    —–

    Issue: When changing the status of any opportunity everyone gets an error:

    Error:Apex trigger dlrs_OpportunityTrigger caused an unexpected exception, contact your administrator: dlrs_OpportunityTrigger: execution of AfterUpdate caused by: System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times): Class.dlrs.LREngine.rollUp: line 210, column 1

    ============
    Debug logs analysis shows that the error is occuring due to a non selective query from the Managed package code:

    11:13:55.1 (320966640)|ENTERING_MANAGED_PKG|dlrs
    11:13:55.1 (322368972)|SOQL_EXECUTE_BEGIN|[210]|Aggregations:0|SELECT CampaignId, Sum(Marge_2016__c) lre0 FROM Opportunity WHERE CampaignId in :masterIds AND IsWon = true GROUP BY CampaignId
    11:13:58.55 (3055899789)|METHOD_EXIT|[7]|01p24000007K7Dz|dlrs.RollupService.triggerHandler()
    11:13:58.55 (3056161207)|FATAL_ERROR|System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
    Even if a field is indexed a filter might still not be selective when:
    1. The filter value includes null (for instance binding with a list that contains null)
    2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)

    Class.dlrs.LREngine.rollUp: line 210, column 1
    Class.dlrs.LREngine.rollUp: line 105, column 1
    Class.dlrs.RollupService.updateMasterRollupsTrigger: line 580, column 1
    Class.dlrs.RollupService.triggerHandler: line 318, column 1
    Trigger.dlrs_OpportunityTrigger: line 7, column 1

    =========

    Query causing the issue: SELECT CampaignId, Sum(Marge_2016__c) lre0 FROM Opportunity WHERE CampaignId in :masterIds AND IsWon = true GROUP BY CampaignId

    ============

    Resolution: The query needs to be optimized to make it selective. This should be looked into by the managed package provider.

    Salesforce supports custom indexes except for multi-select picklists, text areas (long), text areas (rich), non-deterministic formula fields, and encrypted text fields.

    “IsWon” is a non-deterministic formula field hence an index can’t be created.

    You may refer the below mentioned article:
    https://developer.salesforce.com/docs/atlas.en-us.salesforce_large_data_volumes_bp.meta/salesforce_large_data_volumes_bp/ldv_deployments_infrastructure_indexes.htm#:~:text=Salesforce%20also%20supports%20custom%20indexes,optimizer%20then%20considers%20those%20fields.

    https://help.salesforce.com/articleView?id=000325247&type=1&mode=1
    ======================================

    • Sorry for the late reply – my life is quite busy and I don’t get to respond as often as I would like – I am sorry. The good news is I believe I did just respond to your last message with some thoughts. 👍🏻

  14. Are you available to help with errors I am getting from the DLRS – is there a help area you offer?

  15. Is there an issue with the Deploy To Salesforce Tool? I keep getting the following error when I click the “Login to Salesforce” button

    Application error
    An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s