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

174 thoughts on “About

  1. Hello, I’m having trouble using Declarative Lookup on salesforce. How could I get in touch?

  2. The Declarative Rollup looks great, is it free to use?

  3. Hi Andrew, I have a requirement where i need to develop a VF page through which i am able to create queue. So i can have functionality where user can create queue without having access to access to setup area and other permissions.

    Is there anyway to create custom queue page. Can you provide me some directions on same and if there is any other useful info related to it.

  4. I’m trying to download Declarative Lookup but am getting message that the package has been deprecated and can no longer be installed. Saying I should try installing a newer version or contact the package owner. Is there another version available and if so, how do I get a copy?

  5. that should have said- from app exchange, not – for app exchange

  6. I keep getting an error in my Relationship Criteria. I’m trying to calculate the AMOUNT of closed won opportunities YTD and for previous years (i,e., 01-01-2016 to 12-31-2016). FOr YTD, my criteria: StageName = Closed Won AND CloseDate >= 01-01-2017

    The error: Error: Relationship Criteria ‘StageName = Closed Won, CloseDate >= 01-01-2017’ 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 ‘expecting a colon, found ‘Closed”

  7. Hi Andrew , I want to automate a report generation process :

    Report : we need to create a report containing Notes created for each lead in a month.

    What we do Manually:

    We query the data in two way : First we query all the required filed from the the Lead object . Secondly, we query notes record using lead Id as parent Id. Then we consolidate the data in Excel sheet . there is one row per Notes. Means Same lead can have 10 row in Excel if the 10 Notes have been created in a Month.

    For Automating :

    1. Created Custom controller.
    2. Fetch the record using inner query.
    3. Created a wrapper class according to the fields of Notes and Lead required in each row .
    4 Populated the data in wrapper class list.
    5. Then I created a visualforce page ( that will call the action in controller returning the list .
    6. Finally I am calling this Visualforce in a scheduler which return the data .

    But rows can be more 10000 or more . So I am getting String too large or more than 60k ..

    • I used this in page attribute : contenttype=”application/vnd.ms-excel#{!fileName}.xls” Page Name : AgentDealerFollowup

      I am using below code in scheduler :

      Datetime myDatetime = Datetime.now();
      String myDatetimeStr = myDatetime.format(‘ MMMM,yyyy’);
      EmailTemplate et = [SELECT id FROM EmailTemplate WHERE name = ‘Monthly Dealer Report Template’];
      Messaging.EmailFileAttachment attachment = new Messaging.EmailFileAttachment();
      ApexPages.PageReference report = new ApexPages.PageReference(‘/apex/AgentDealerFollowup’);
      attachment.setFileName(‘Agent Dealer Follow up’+ myDatetimeStr + ‘.xls’);
      attachment.setBody(Blob.valueof(report.getContent().toString()));
      //attachment.setContentType(‘text/csv’);
      Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
      message.setFileAttachments(new Messaging.EmailFileAttachment[] { attachment } );
      // message.setSubject(‘Report’);

    • Try readOnly mode for your Visualforce page, it’s an attribute

  8. Hi Andrew, I’m trying to deploy DouglasCAyers/sfdc-reloadable-visualforce-lightning-component to my salesforce sandbox and I’m getting the following error: “Failures: pages/DemoAccountFlowPage.page(DemoAccountFlowPage):The specified Package Version number does not exist for that Package: dlrs, 2.8.” It says deployment complete but I don’t see the custom component. Any help would be useful I’m anxious to get this working in my org and it would help a lot. P.S I’m not familiar with the processes in Github Thanks!

  9. Him Andrew, I bought your book and I think is amazing. Just to tell you that on page 59, indicates that Data Replication is a REST API, and I think it is just SOAP.
    Again, thanks a million for writing such an amazing book.

  10. Hi Andy,
    I have had some great success with DLRS for my clients. I would like to do a webinar for them and show them how it might help them with some of their problems.
    I like to check in with authors before presenting their material.
    Please let me know if this is OK with you.
    Thanks… Bob

  11. Hi Andrew, following along with your amazing book and blogging myself about Salesforce Connect (https://salesforcegraells.wordpress.com/2017/10/30/salesforce-connect-amazon-rds-odata/) I read on page 76 that External Objects has some limitations on Reporting. As those limitations are not detailed, if those were related to the blog entry made by Mark Kovacevich (https://developer.salesforce.com/blogs/engineering/2016/02/salesforce-connect-reporting.html) on Feb 2016, it is very satisfying to know that they were superseded with new functionality on Winter 17 (http://www.odata.org/blog/Webinar-on-Salesforce-Connect-External-Object-Reporting/).

    Probably you wrote about other limitations, but just in case where those that were present on Mark’s article, I’d like to point it out.

    Again, thank you so much for what a wonderful book and blog.

  12. Hey Andy, I’m working on a project that uses the fflib architecture. We’ve been debating about whether or not trigger logic should be allowed call out to service classes. On one hand, it is an easy way to satisfy business rules such as ‘after on close of ProductOne, call ProductTwoService.activate()’. On the other hand it seems wrong for domain logic to call out to services.

    I guess ideally the structure would be:
    ProductOneService.close(productOnes) {
    new ProductOne(productOnes).close();
    ProductTwoService.close([select related productTwos]);
    }

    Would you recommend treating these sorts of updates as an implied service call? Or should the product be structured in a way that the only way to perform certain updates is via a service call?

    Thanks for any feedback! Love your work.

    John

    • Hey John, i think… i recall responding to a question like this before? Sometimes duplicate comments get posted so wanted to check. Did you get a response from me on this?

      • Hey Andy, a colleague and I were just having another discussion about this & I pulled up this post and saw that you had replied! I must have forgotten to tick the notification boxes and so missed your response.

        No, I haven’t received a response from you on this, but I’d love some advice. What criteria do you use to draw the line between ‘trigger logic’ and ‘not trigger logic’? I struggle sometimes between the convenience of a trigger and the greater readability of leaving logic outside of the trigger.

      • Service logic orchestrations tasks, that span multiple objects, often multiple queries and multiple updates, kind of like the conductor in a band. Trigger/Domain logic focuses on the integrity of your data, validation, defaulting etc. Some folks like to start processes from triggers so sometimes call the service layer from the that. I know there are sometimes no elegant altertnatives without creating a new UI, but i do regard that as a bit of an an anti-pattern. These days we have many more ways to customize the native UI, custom actions, components etc. these controllers can invoke the service.

  13. Hi Andy ,

    I am facing issue on Test class for Meta ServiceExample Class.
    I unable to get any wayout for this.

    Can you please help me

  14. Hi Andy ,
    Congratulations….Commendable work by you
    I am New to metadata Api . I have used your Code for The same and modified accordingly but i am not able to Run test class for it.
    Can you help me with the test class?
    I have raised an issue on The GITHUB. Please help me with the Issue
    (https://github.com/financialforcedev/apex-mdapi/issues/193)
    Please help me with this

  15. Hi Andrew
    Thanks for sharing your work and incredible articles. It really helps.

    I am trying to generate the latest Tooling API class using Tooling API wsdl download from Setup > Develop > API.
    It generate multiple classes….

    The Tooling API class here in this article is a single class.
    https://github.com/afawcett/apex-toolingapi

    Could you please guide how can i generate it.

  16. Hi Andy, I am getting the error message “This Remote Site Name already exists or has been previously used. Please choose a different name.”. If I delete that Remote Site and re-create it, will this affect any existing roll up summaries?

    • No, not at all, it’s only used when configuring them

      • Great, thanks so much!

      • Hi Andy, I have come across another issue. I updated to the most recent release (in an org that had previously installed it in 2014). In the Aggregate Operation field, all of the “concatenate” options, as well as First and Last, are missing from the picklist. I tried simply adding the picklist value, though I assumed that that wouldn’t work, and it did not. Is there something else that I need to do to get the Concatenate functionality? Thanks again!

      • Yes you need to add these. Double check the Readme release notes. I cannot recall the release, but if you scroll back through the release announcements you will see where I originally stated what you need to do in upgrading to the release that added these options.

  17. Hi Andrew – thanks so much for writing and posting this code. Awesome. Took me a few hours to create some list views but worked like a charm. Thanks so much!

  18. Hey Andrew. Your tools are amazing. I was wondering if I could ask you if there is a way to gather ‘consecutive’ records in the declarative lookup rollup summaries. I.e. if an account has 4 contacts named Noah Matt Noah Noah Matt created in that order, I could do a summary of contact records with a filter for Name = Noah, and that would show that Noah had come in twice in a row.

    If you have any ideas around this or how I might accomplish it that would be great.

  19. Great work Andrew…
    We have installed DLRS managed package and scheduled some rollups, having same child object.
    Sometime it gives exception “UNABLE_TO_LOCK_ROW”.
    Guide us on this.

    • Adjust the schedule to avoid overlap or if possible criteria. It’s a platform error to avoid inconsistent data. Review the wiki page on scheduling I added some notes at he weekend re retry logic.

  20. Hi I am trying to contact you and your telephone number isn’t working. I need to speak to you about your app that has been installed in our salesforce by the consultant who configured it. I have spoken to salesforce premier support and they need me to talk to you so you can log a case with them?
    Can you call me asap or email me a correct number?

    Thanks

  21. Hi Andrew,

    Hoping you can help. I’ve been running into an issue with Lookup Roll Calculate Jobs for a while, and I still haven’t managed to find a solution. I’m experincing the error “A calculate job for rollup ‘x’ is already executing.”. Sure enough, there are jobs which have failed to complete for whatever reason which I have to delete manually, however this is intermittent, sometimes all jobs will complete no issue, other times they will stumble and fail with that error. I have updated to 2.11 as I read this was a known issue prior to 2.8, but still the issue persists.

    Is there anything you can advise?

    Thanks, Jarrod.

    • Yes I am getting reports the fix is not always working. I have some more detail from another user. I will try to see what’s going on this weekend. Can you message my AndyInTheCloud user in Salesforce Community with your email and details if I need to reach out.

  22. Hi Andrew,

    Hoping you can be of assistance.

    I’m facing an issue whereby, if a record suddenly falls outside of the rollup criteria scope, historical field values are blanked out?

    So for example, one of my criterias is that the record data is within last 30 days. The rollup works fine, aslong as the date is within the last 30 days, but as soon as it falls outside of that date, the aggregate field is blanked.

    Is there a way to keep this data persistent historically?

    thanks

    • No, but you could have a workflow rule copy it over to another field but only when there is a value and it’s changed. Then use this field on your layouts, reports etc

  23. Is there a sandbox version of the Declarative Rollup Summary Tool? We have to test all new packages in a non-production environment here.

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 )

w

Connecting to %s