fallbackcg

What is Elastic Compute? – Sorry Functions!

Here’s a quick blog from one of our Technical Architects at Cloud Galacticos, Mike Gill. He was interested to see that Salesforce Functions is now generally available. Here’s his initial thoughts:

 

Mike Gill

Mike Gill

What is Elastic Compute? – Sorry, Functions!

A couple of years ago, our COO Paul wrote one of our most popular blogs ever on Salesforce Evergreen after it was announced at Dreamforce 2019 calling it a game-changer for Salesforce developers. A little over 2 years have passed since then and Evergreen has now finally become Generally Available and has a new name – Salesforce Functions. But what are “Functions”? Elastic Compute; sometimes called Serverless, or now simply put “Functions” is Salesforce’s answer to services already provided by other major cloud providers.

It’s little more than that. It has been talked about for ages; why can’t Apex be more like Java? Well now you can now use proper Java in Salesforce!! And if you have been expanding your Node.js skills like I have, you now have the ability to build out solutions leveraging the wealth of Node.js npm libraries out there.

 

What are the benefits of Functions?

Whilst you have been able to integrate with Salesforce using other languages for a long time, the big difference here is that with Functions all your code runs within the “Salesforce trust boundary.” This means all of your permissions and security are handled for you. Also, it doesn’t even count against your Salesforce request limits!

 

Get involved

Why not start playing around with it today? The keys to the kingdom are now unlocked!

 

Why not sign up?

If something is too good to be true, then it probably is! We’ve heard this before with Salesforce… Well, not this time if seeing is believing.  Functions have landed and you can start your New Year off with an exciting new tool!

Sign up here and try it out  https://functions.salesforce.com/signups

 

About Cloud Galacticos

Cloud Galacticos is a  Salesforce Consulting Partner with an all-star team. We are user and developer group leaders, bloggers, MVPs and all round Salesforce nerds. Our Salesforce consultancy has people all over the UK including Manchester, Leeds, Newcastle, Sheffield, and London. If you are looking for a Salesforce partner with experience who can help you make the most of your org, why not give us a call?

fallbackcg

Salesforce Developer Podcast – Weird Apex and Being Inquisitive

Recently Josh Birk interviewed my for the Salesforce Developer Podcast on “Weird Apex”. You can find the full recording here. I’m going to share some additional thoughts about the background to the discussion and how the simple act of being inquisitive has lead me to some of the weird and wonderful things I discussed on the podcast.

 

Weird Apex Salesforce Developer Podcast

Image taken of https://developer.salesforce.com/podcast/2021/05/episode-82-weird-apex-with-paul-battisson.html

Love What You Do

When we meet clients for the first time, we tell them that at Cloud Galacticos we are 100% Salesforce nerds. We have team members who are MVPs, user and developer group leaders, and authors. We also have speakers, CTAs, and a number who tick multiple of these boxes. When hiring, one of the things we focus on is how much people enjoy working with the platform. I always ask “Why Salesforce?” Of course, sometimes working your way through a big set of profiles and permissions to figure out what the gaps are is not the most riveting work. I find that it is important to ensure I take time to do things I enjoy within my work to stay inquisitive.

A prime example of this is the VR setup I built with Vincent Reeder for a Dreamforce talk. Virtual Reality is cool and still fairly new tech, however it is not really enterprise friendly (as we discuss in the podcast). Still, Vincent and I took it as a technical challenge to see how we could get different pieces of the Salesforce Platform to play together to deliver something cool. Is this a completely practical exercise that we will reuse? No, but the learnings on how to use the different bits of technology will definitely help me in the future. It’s a much more fun way of learning.

 

Build a Career You’re Interested In

I’d highly encourage anyone who is looking to learn more about a particular topic to approach it in this way. By trying to keep this in mind I have built my career on Salesforce and have had a great time doing so. It has helped me learn enough to be able to write two books on Apex as well as given me the opportunity to speak at events all over the globe. I would recommend listening to other episodes of the Salesforce Developer Podcast. You will notice this is a common theme.

Phil's Salesforce Tip of the Week

Org Shape and Critical Incidents – Phil’s Salesforce Tip of the Week #451

Tip 1 – Org Shape

Thank you to our Architect and fellow MVP Mike Gill for this one…”The Org shape feature has had a bit of rough ride to get here, those familiar with the history of the feature will know this. Now it is officially available to all as a Public Beta, anyone can take it for a spin!

What is it? – Create an org shape to mimic your baseline setup – scratch orgs have been largely difficult to adopt due to the complexity of getting your Scratch Org setup to look like a Sandbox or Production Org. Org Shape allows you to easily create Scratch Orgs which match you Production Org in terms of licenses, features, settings and limits. The once impossible task of getting your scratch org looking like a production org is now possible.”

Take a look here for more details.

Mike also adds:

“If you don’t know the benefits of scratch orgs – here are some- As we move into a more DevOps centric world, scratch orgs provide a unprecedented level of control around org management which is necessary for CI/CD
– Ability to track changes easily and pull down only the changes you want
– It forces better developer practices – such as modularisation”

Tip 2 – Critical Incidents

Some of the Community saw this management come into affect this week, after issues on Wednesday…so if you want to learn about Critical Incidents, from either side of the desk, take a look at this Trailhead module.

Final Tip – Sign up

Remember if you have enjoyed this week’s tip then sign up for the weekly email, direct to your inbox here!

Phil's Salesforce Tip of the Week

Command Line Data Loader – Phil’s Salesforce Tip of the Week #450

Tip 1 – Command Line 

(2 words that can strike fear into ‘non-developers’) Thank you to our Lead Developer Simon for sharing a use of the Command Line that many probably do not know about…

“Did you know that DataLoader can be launched from the command line? Setup can be fiddly, but once working this can be a robust solution for getting data in and out of Salesforce. Run a command after exporting data from databases, run a scheduled job to ensure Salesforce data is ready for work, or leave a shortcut to a batch file on the desktop of a User who needs to import data occasionally. See this for more info”.

Here is some further information from the Data Loader guide

When running Data Loader in batch mode from the command line, several operations are supported. An operation represents the flow of data between Salesforce and an external data source, such as a CSV file or database. You can use the following operations. Enter values in the process.operation parameter in lowercase

Operation Description
extract Uses the Salesforce Object Query Language to export a set of records from Salesforce. The exported data is written to a data source. Soft-deleted records are not included.
extract all Uses SOQL to export a set of records from Salesforce, including existing and soft-deleted records. The exported data is written to a data source.
insert Loads data from a data source into Salesforce as new records.
update Loads data from a data source into Salesforce, and updates existing records with matching ID fields.
upsert Loads data from a data source into Salesforce. Existing records with a matching custom external ID field are updated. Records without matches are inserted as new records.
delete Loads data from a data source into Salesforce, and deletes existing records with matching ID fields. Deleted records are moved to the Recycle Bin.
hard delete Loads data from a data source into Salesforce, and deletes existing records with matching ID fields without first storing them in the Recycle Bin.

Tip 2 – Help when you can

I know there are a lot of important causes vying for our attention. We at Cloud Galacticos wanted to show our support for our friends and colleagues in India, but were unsure of how to do so. Just in case anyone is looking, we found the DEC a reliable and trustworthy place to donate.

Final Tip – Sign up

Remember if you have enjoyed this week’s tip then sign up for the weekly email, direct to your inbox here!

Phil's Salesforce Tip of the Week

Data Recovery, Trailmix, New Community Event – Phil’s Salesforce Tip of the Week #444

Tip 1 – Data Recovery Returns

Phew, we can all relax and delete our live data now!! Well not quite, but having have to use this safety net once in my lifetime is enough to appreciate that it is back! Read more about it here.

The post says “Last year, we announced plans to end our Data Recovery Service. We arrived at this decision through several factors — most notably, the small number of customers actively using the service and availability of numerous third-party solutions.

However, you, the Salesforce community, correctly pointed out that Data Recovery Service’s value lies in its very existence and knowing that it’s there in the event of an emergency.”

There are great backup services available on the Appexchange, but if you dont have one of those and an emergency happens, this is your lifeline!

Note also a hint of a new/upgraded feature to come…

“…based on customer feedback, we are pleased to announce that we will pilot Salesforce backup and restore services built natively on the Platform this summer. We’ve co-designed these services with customers and we expect to deliver the performance, speed, and scale that you’ve come to expect from the Salesforce Platform while continuing to provide additional ways to innovate and extend these capabilities through our vibrant ecosystem.”

Tip 2 – New Trailmix

Complete this Spring ’21 Trailmix for Developers by March 31, to earn a special community badge, and enter to win prizes…and learn more about the release contents of course.

Tip 3 – Consultancy Dreamin’

This is a new Community run event, planned for June 2021, and the call for speakers is now open. The website explains “Consultancy Dreamin’ was created for anyone who already is or wants to be a Salesforce Consultant.” Count me in.

Tip 4 – New Video

We launched this at London’s Calling last week, hope you like it 🙂

 

Tip 5 – Sign up

Remember if you have enjoyed this week’s tip then sign up for the weekly email, direct to your inbox here!

Phil's Salesforce Tip of the Week

Optimizer App and London’s Calling – Phil’s Salesforce Tip of the Week #443

Tip 1 – Optimizer

A great way to review your Org, and get suggestions on areas for improvement, is by using Salesforce Optimizer. The report has been around for a while, but soon to be disabled in June as the App is more interactive. Nothing to instal, just search ‘Optimizer’ in Setup and click ‘Open Optimizer’ to reveal a list of suggestions and estimates. Turns out I have lots of unused Fields, and Reports I have never run!

From the Salesforce Help docs…

The Salesforce Optimizer app analyzes more features than the existing PDF report and in a more interactive and actionable format. Quickly identify issues that require immediate attention by using the sortable list view. Read through expert Salesforce recommendations to plan next steps.

Consider running Salesforce Optimizer as part of your monthly maintenance, before installing a new app, before each Salesforce release, or at least once a quarter. You can run the report as often as you want to keep on top of maintenance activities. You can set the App to run automatically on a monthly basis.

Tip 2 – London’s Calling you Now! 

LC2021 is just kicking off. We are happy to be sponsoring today, as we have for every LC event! There is always great content, so it is THE best UK Salesforce event in my opinion. I am looking forward to:

Lawrence Newcombe’s session ‘Ready, Set, Architect’ at 10.45am,

Leslie Gestautas’s session on migrating data at 3.30pm,

and of course our very own Paul Battisson’s session ‘Improving the performance of your Apex Code‘ at 2.45pm.

I am sure the sessions will be available on YouTube in the coming weeks, but it is always good to block out a chunk of learning time all in one go at an event like this.

Keep an eye out for our new animated video & tell me what you think!

Tip 3 – Sign up

Remember if you have enjoyed this week’s tip then sign up for the weekly email, direct to your inbox here!

fallbackcg

Go with the (record-triggered) flow!

Welcome to the first in a series of blogs on automation. If you’re a Salesforce admin, this is for you. We’ll be posting about our thoughts on the latest features that will make your everyday working life a little bit easier.

To launch our first blog, we have our senior consultant, Val, talking about declarative development.

Today I’m going to talk about my latest favourite feature in declarative development – Before Save Record-Triggered Flows‘.  It doesn’t exactly trip off the tongue but I think once you’ve made one, you’ll start to realise their potential for making declarative automation much more powerful in your org! Record-triggered flows are relatively new (Summer 20) and I’ve started to see several ways they can be used to great effect.

 

So what is it?

Let’s start with the alternative. You’ve probably come across triggers, whether you’ve written one or have had a developer make one for you. Triggers can act on a record at key points in the save or delete process. For example, when a new record is created, updated or deleted, it can be updated prior to being saved  to the database using a ‘before’ trigger or after being saved to the database with an ‘after’ trigger, depending on how the trigger is written. Triggers are a great way to automate some tasks for your users or make sure data in your org is complete and useful.

Whilst triggers do a great job, they can also be cumbersome for an admin, unless you are also an accomplished developer. They can only be changed in production via deployment, which normally also includes successfully running test classes. In my experience, this can mean rewriting an out-of-date test class just to redeploy a trigger as inactive. Of course a well-thought-out trigger, which utilises custom settings to allow easy deactivation, is very helpful but (sadly) rarely exists, especially in existing client orgs.

 

What if you don’t have a developer on hand to write a wonderful trigger, complete with admin-thoughtful features?

Enter the record triggered flow (fanfare please!) Bask in the glory of making your own code-free, visual and flexible flow that can update, validate and clean data BEFORE it hits the database!!

 

How is this better than making updates post-create/update?

Many organisations, which prefer declarative development, use automation such as process builders and workflow which kick in after a record is created or updated. These, in turn may trigger off further automations, building up masses of post-save automation processes. In the absence of a better declarative alternative, it can get difficult to troubleshoot when something goes wrong. 

Introducing a well made BEFORE save record-triggered flow, could provide a welcome opportunity to replace a plethora of post-save updates and take some of the burden off post-save automation overall. Additionally, automating BEFORE save can help your org take better advantage of existing features such as custom validation rules, which run after ‘before’ save flows/triggers in the order of execution. By making the change before the record is saved, we also avoid unnecessary database updates and further processing making everything a little quicker.

 

What’s an example use case?

Let’s look at a simple data quality/validation scenario:

  • Galactic Outfitters hold quarterly virtual events for stockist companies to look at new products to sell in their stores.
  • Multiple teams of Business Development staff at Galactic Outfitters call lists of stockist contacts to register them for these events.
  • Galactic Outfitters uses a custom object ‘Event__c’ and another ‘Attendee__c’ child object, related via a master/detail relationship to record the attendees via a contact lookup. 
  • A contact can attend multiple events but should not be recorded as an attendee to any one event more than once.
  • Occasionally, Business Development staff mistakenly register a contact as an attendee multiple times to the same event. Since events have become more frequent and the Business Development team has increased in size recently, Event Managers have noticed their event attendance reports show incorrect totals and have become frustrated.

For this scenario, we want to validate against a new attendee record being created where one exists already for the same event and contact combination.We can combine a new checkbox field, a before save record-triggered flow and a validation rule on Attendee__c to accomplish this:

 

New checkbox:

New flow:

We set our Flow to trigger on record creation and set the “Run Flow” option to be before the record is saved. We are working with our Attendee object and set the following conditions – make sure there is a contact and an event for the attendee record (both are not null).

The first set in our flow is a “Get Records” step named “Find Duplicate Attendee”. We find the first record in the Attendee object where Contact = this record’s contact AND Event  = this record’s Event.

We then have a Decision node named “Duplicate Detected?” which checks for whether the value returned from “Find Duplicate Attendee” component is not null (i.e. we have an existing record that has matched). If “Yes” we have an assign action “Assign Duplicate Detected” which sets the “Duplicate Detected” field to true, otherwise we end the Flow.

 

New validation rule:

 

Try it out:

 

Et voila! 

The user cannot save a new attendee when a matching attendee record already exists. This is because the flow assigns the ‘duplicate detected’ checkbox to true for a matching attendee BEFORE the new record is saved and BEFORE custom validation rules run. The validation rule stops the record from being created and displays the error message to the user. Mission accomplished!

*********

Wise Words

A wise person once said “With great power comes great responsibility“. This is true when we have more power to declaratively automate in Salesforce. 

#AwesomeAdmins always think about the bigger picture

It is tempting to automate as much as possible and start adding new process builders and flows for each new requirement that comes along to keep everyone happy.

It is important to always remember the long-standing recommendation from Salesforce that we keep the number of process builders per object to a minimum (ideally 1), where possible. With this in mind, Admins should also develop record-triggered flows along the same lines. In other words – updating & optimising versions of existing process builders or flows instead of creating multiples against a single object. 

Utilise decisions, criteria and sub-flows within your single flow/process per object to make sure actions are triggered only when required and at the right time will prevent conflicts, making for a more efficient org and therefore happier users! And – the cardinal rule – ALWAYS test your new process/flow/version in a recent sandbox before activating it in a production environment!

 

Good luck and most of all, have fun with your new-found power!

 

 

 

Phil's Salesforce Tip of the Week

Postman and World Tour – Phil’s Salesforce Tip of the Week #437

Postman

Last year Salesforce announced that they had released a Postman collection to allow developers to work with the Salesforce APIs and get up and running quickly building integrations. For those who haven’t used Postman, it is a fantastic tool to allow you to call and work with APIs and verify that you have the correct request parameters and inspect the responses. It is one of the favourite tools of the techies at Cloud Galacticos.

 

The Salesforce developer evangelist team have announced a raft of additional updates to the collection including it now being listed on the API network making it easier to find, and enabling developers to contribute to the collection to enhance it and share those enhancements with the community. If you are looking to work with the Salesforce APIs I highly recommend that you check this resource out to give you a head start.

World Tour 2021

Please don’t say it is ‘re-imagined’… This year’s World Tour will happen in 1 day (10th Feb), with “an original series broadcast live from surprise locations around the world”. Register here, to see if a surprise location includes some fake bushes in San Francisco!

Personally the World Tour in London has been my annual highlight, but an in-person event which of course won’t happen for a while. Nothing beats the chance to meet up with friends, Clients, colleagues, community members, and new people that you have Salesforce in common with. But this will suffice for 2021, we will all make the most of it!

Welcome!

This week Salesforce announced that David Schmaier has been named President and Chief Product Officer. David joined Salesforce through the acquisition of Vlocity, where he was the co-founder. Read a welcome post and interview here.

Congratulations!

Congratulations to our latest Galactico to join become a Certified Architect!! Great work Val Southern! I am sure there will be a blog post following soon…but this week Val passed her Data Architect and Management Designer cert, which was the last one needed in order to gain the Application Architect certification. Very impressive!

Phil's Salesforce Tip of the Week

NonProfit Summit and Developer Survey – Phil’s Salesforce Tip of the Week #436

NonProfit Summit

As NonProfit Dreamin comes to an end today, the next big NonProfit (virtual) event is now open for registration. It will kick off on April 21st in 4 different regional timeslots (and April 22nd in APAC). Register here. As well as speaker sessions and breakouts, there will be a special guesy Dr. Jane Goodall, UN Messenger of Peace, conservationist, and champion of human rights

 

Here is the full breakdown of times/dates:

  • United Kingdom: 1:00 – 4:30 p.m. BST / 13:00 – 16:30 BST
  • Europe: 2:00 – 5:30 p.m. CET / 14:00 – 17:30 CET
  • Americas: 8:00 a.m. – 2:00 p.m. PT / 08:00 – 14:00 PT
  • APAC: Thursday, April 22, 12 p.m. AEST

Share your thoughts

The annual Salesforce Developer Survey is now live, so you can share your feedback with Salesforce. Visit the survey here, and here are some highlights of the 2020 survey. The survey opens midnight on January 27, 2021 and closes at midnight Pacific Time on March 7, 2021

Are you ready?

As Salesforce releases get bigger and bigger, so do the release notes, and the release readiness webinars. Here is a link to them all for Spring ‘21, starting today with the Developer and Admin preview sessions. See below for the dates (I told you there was a lot!):

January 29
Developer Preview Live
Admin Preview Live

February 1
Sales Cloud
Tableau CRM

February 2
Service Cloud
Salesforce Field Service

February 3
Salesforce Flow
Work.com

February 4
Experience Cloud
Commerce Cloud

February 5
Marketing Cloud
Pardot

(Join in live and get your questions answered via social networks with the hashtag #salesforcelive. )
Phil's Salesforce Tip of the Week

Covid Passport and IdeaExchange – Phil’s Salesforce Tip of the Week #435

Covid Passport

Salesforce has joined forces with Microsoft and Oracle to develop a method of proving that people have been vaccinated. As it seems likely in the near future that governments, airlines and others could soon start asking people for proof that they have been inoculated.

The coalition known as the Vaccination Credential Initiative includes Microsoft, Salesforce and Oracle, as well as U.S. health care non-profit Mayo Clinic.

 

 

CNBC says “The VCI said it wants to develop technology that enables individuals to obtain an encrypted digital copy of their immunization credentials that can be stored in a digital wallet of their choice, such as the Apple Wallet or Google Pay.” Take a look at the full article about the Covid passport here.

 

Ideas about Ideas

Firstly, if you don’t know about the IdeaExchange then you should take a look. It is a great place where you can log an idea or a request that you think could benefit Salesforce and the wider ecosystem. Then people can vote up/down, comment, add suggestions and workarounds. In the last 12 months, this has been taken a step further, where Salesforce will make a shortlist which you can further vote on and prioritise.

Time to prioritise your favourite Ideas from the shortlist. Click here to decide which one’s you think should be worked on next.

And also…

This new group has been set up to discuss Ideas v2.0, which is seemingly coming very soon. Old ideas with little activity will be Archived, those with a negative point count will be deleted, everything else will move to the new site. It is expected that it will archive approximately 39,000 ideas while keeping 30,000 active. Add your comments, concerns, questions to the Chatter group.

Why does this need to happen? Well firstly there are 10 years of Ideas! Many are old, irrelevant, unloved, unwanted. And that is a lot of noise. I am not sure the proposed updates will solve all the problems, and maybe some perfectly relevant Ideas will be lost, but a refresh is needed, so lets give it a go!