A better clipboard, and a broken flow.
It's the Kicksaw monthly newsletter! Wahoo!

A better clipboard, and a broken flow.

Hello friend,

Since Kicksaw was founded four short years ago, we've seen dramatic changes in how companies adopt and customize Salesforce. In short, customers are asking for Salesforce to do?more.?

As the market (and Salesforce as a product) has matured, the demands of customers have shifted as well. Forward-looking companies are looking for Salesforce to do things we never considered when we first got started. Automation, integrations, and bespoke customization are in high demand today, and we're seeing customers ask to tie product development, management of internal processes and knowledge bases, manufacturing, and vaccine development all into Salesforce.

At Kicksaw, we've been fortunate enough to have a dynamic team who can respond to these changes and continue to set the standard for how Salesforce consulting can work. It's a really exciting time here at Kicksaw, and we hope you enjoy this newsletter, which is chock-full of the hard lessons we learn each and every day.

~Kyle Morris , co-founder???

Insider Tip: Don't Go Breaking My Flow?

It's our Creating Flow Errors series, hosted by?Flowmaster General Aaron Haag!

We have all experienced the triumph of pushing the Debug button, seeing our complex business process do exactly what we intended, and moving our most recent success into production. Not so fast!?

An unhandled fault has occurred in this flow

An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.?

Creating Flow Errors is a series aimed at creating unhandled faults intentionally. If you can create the error on purpose, it will be much easier to troubleshoot or avoid the error. Each article will include one way to create an error and one solution. But there are many ways to solve problems in flow; we would love feedback on other solutions you have used to solve the same problem!?

The Error

If you use a record variable to update or delete records, the ID value in the variable must be populated.?

One of my guiding principles when building flows is simplicity. Limiting variables is one way I try to achieve simplicity. When you create a Get Records element, flow creates a record variable for you. I sometimes have a requirement to update a record if it exists, or create a new one if it does not. In these cases, I will use the empty record variable created by the Get Records to store the values for my new record. I give myself the responsibility to know if a record variable is holding a new record (no Salesforce Id yet) or an existing record (Salesforce Id is populated).

Today’s flow error is caused by using this pattern and adding only an Update Action at the end of the flow.?

The Pre-Build

  1. Navigate to the Account Tab
  2. Select New Account
  3. Name: 'Test Account'

The Build

Follow the instructions below to create an autolaunched flow that will generate our error.

  1. In a sandbox or dev environment, create a new flow.
  2. Select Autolaunched Flow (No Trigger)
  3. Select ‘New Resource’ on the left and create an input variable called InputAccountName

  • Resource Type: Variable
  • API Name: InputAccountName
  • Data Type: Text?
  • Available for Input: Checked

4. Click the ‘+’ to add an element and select ‘Get Records’

  • Label: Account
  • Object: Account
  • Condition Requirements:?All Conditions are Met (AND)
  • Field: Name
  • Operator: Equals
  • Value: InputAccountName

5. Click the ‘+’ to add an element and select ‘Decision’

  • Label: Account Exists
  • Outcome Label: Yes
  • Condition Requirements: All Conditions Are Met (AND)
  • Resource: Account from Account?
  • Operator: Is Null
  • Value: False
  • Select the Default Outcome Tab - change the value to ‘No’

6. Click the ‘+’ to add an element on the ‘No’ path and select ‘Assignment’

  • Label: Set Account Name
  • Variable: Account from Account > Account Name
  • Operator: Equals
  • Value: InputAccountNameResource

7. Click the ‘+’ to add an element at the bottom of the Flow (runs for both ‘yes’ and no’ decision paths. Select ‘Update Records’

  • Label: Update Account
  • Record or Record Collection: Account from Account

8. Click Save

  • Flow Label: Creating Flow Errors | May 2022

9. Click Debug

  • InputAccountName: ‘Test Account’
  • Note that it runs with no errors.

10. Click Debug

  • InputAccountName: ‘Some Account Name that Doesn’t Exist’
  • Click Run
  • Note the desired error!

The Fix

When you use this pattern, you should put an Update Records on the ‘Yes’ side of the decision and a Create Records on the ‘No’ side of the decision. In addition to reducing the number of variables in your flow, you now have the added benefit of having the Account data stored in one place. If your business logic requires you to do something else with this account, whether it was new or existing, your data is in one place, so you don’t have to keep separate streams in the flow!

We would love to hear your feedback and suggestions. Have you found a different way to solve this problem? Do you have a clean way to generate an error message in conjunction with this solution? Reach out on LinkedIn to let us know!

No alt text provided for this image

A Quick Peek Inside Our Toolbox

Without tools, man (and woman) is nothing. ~Thomas Carlyle?

For all you Apex coders out there (or other developers out there), our CTO Tim swears by this clipboard stack tool for Mac.?Flycut allows you to stack up all your copy operations into a “stack," ?then you can move backwards through the stack to get at older text you’ve copied.?

Simply put,?every time you copy or cut text, Flycut stores your “clipping” in a temporary stack for later retrieval.?Flycut lives in your menu bar for easy access. You can access your recent “clippings” there, or you can trigger your clipping list via a global keyboard shortcut (Command-Shift-V).

For Windows users, check out?this list ?of alternatives.

No alt text provided for this image

Integrating Outreach with Salesforce?

If you're facing the prospect of integrating Outreach.io with Salesforce, you're in luck! This month, we're giving you a free course in how to do just that. Check out our blog post to learn how to get started on the right foot.

No alt text provided for this image

Four weeks minimum vacation, anyone?

We might be preaching to the choir here, but...Kicksaw is a pretty great business. And we're not just great to do business?with,?either. We're also a fantastic place to work?for. With unlimited PTO (with a four week minimum), 24 hours of paid volunteer time off, generous benefits, career advancement opportunities, competitive pay, and a fun-loving team, there's a little something for everyone.?

If you're looking for your next opportunity,?check out our current job openings! ?We're actively hiring, both for Salesforce and non-Salesforce roles.?

No alt text provided for this image

Awaiting your resumé,

The Kicksaw Team

P.S. Like what you saw here, but you'd rather read it as an email? Sign up to receive next month's newsletter in your inbox!

要查看或添加评论,请登录

社区洞察

其他会员也浏览了