"That Needs Apex" and Other Scary Stories...
Jul 21, 2024"That needs Apex."
We've all heard it before.
I was talking with a fellow consultant this week when she mentioned that one of her clients wanted to convert a lead in a screen flow.
She knew a flow couldn't convert a lead by itself (at least not yet), so she told her client that the solution would need Apex code.
Now, she was investigating alternatives.
"That needs Apex."
If you've been around the Salesforce space for a while, you've likely heard the phrase.
It can be an idea killer.
The implication is that writing Apex code is a skill set less common than flow building.
Furthermore, it suggests that using Apex as a solution will take so much time as to not be worth it for low-priority or "nice to have" requests.
But, just because something needs Apex doesn't mean it can't be quick and easy.
Having encountered this lead conversion request before, I know of free code provided by Salesforce that's available here. (Side note: I updated that code sample for 2024 and it's available here)
Just copy and paste it into your environment, and in minutes - not hours - you're good to go.
Once this code is in your org, you can drop it on the flow canvas as an action, and it works well.
I was lucky to have that code bookmarked and was able to share it with my colleague.
She knew exactly what to do with it and was delighted Salesforce had this resource available.
So next time you hear "that needs Apex" or something similar, don't give up right away.
Do what my colleague did and start going through the troubleshooting checklist:
- Ask a peer if they've solved this before
- Google for existing open-source code
- Ask ChatGPT to try and solve it
You'll be surprised how often you find a solution.
Hope this helps!
Best,
Nick
SalesforceĀ Saturdays
Join the Salesforce Saturday newsletter. Every Saturday, you'll get 1 actionable tip on Salesforce technology or career growthĀ related to the Salesforce Industry.
We hate SPAM. We will never sell your information, for any reason.