function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Stephanie W ShawStephanie W Shaw 

Trailhead Challenge Create a flow to streamline entry of new accounts, contacts, and opportunities.

I'm working on Trailhead Challenge to Create a flow to streamline entry of new accounts, contacts, and opportunities.

I've got a screen with:
  • First Name
  • Last Name
  • Company Name
  • Opportunity Amount
  • Opportunity Stage

Then Record Create to Create Account:
  • Name = Company Name
  • Variable AccountId

Then Record Create to Create Contact:
  • FirstName = First Name
  • LastName = Last Name
  • AccountId = AccountID

Then Record Create to Create Opp:
  • Name = Company Name (Can i use formula for Company_Name + "-" + Last_Name?)
  • CloseDate = Flow.CurrentDate (can I use Flow.CurrentDate + 30?)
  • AccountId = AccountID
  • StageName = Prospecting
  • Amount = Opportunity_Amount

The flow saves. But when I run it and enter info, I get error:
"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."

At first, I thought it was because my formula weren't working to concatanate company name and last name, or to add 30 days to date for close date. But even when I remove the formulas and just use the screen fields, I get the same error.

What am I doing wrong?
Tobias ThielTobias Thiel
Hi Stephanie,

I had the same issue when I first executed my flow. I followed the hint provided here (" target="_blank) and added an output screen to each create step (see screenshot below) showing the following text: Flow Messsge: {!$Flow.FaultMessage}

By doing this I found out that I created the formula for opportunity name but forgot the opportunity name in the field-value mapping.

For Opportunity Name I used the formula: {!Company_Name} & "-" & {!Last_Name}

Kind regards

Flow Screenshot
James Gordon 10James Gordon 10
Kudos to Tobias.  Inserting some "fault" screens helped me figure this out, too.

I was getting emails from the system, telling me that my Opportunity didn't have a required field (StageName).  I added a few screens that displayed the fields right after they were gathered, and I was able to see where things went off track.

Like so:
Screenshot of Cloud Flow Designer
Laura Force 19Laura Force 19
Hi Tobias and James.  I am getting the following error message (after trying all your tips above).  Any help would be greatly appreciated, I am stumped! 

UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [StageName] --- for SFDC record with ID : null, 

I have mapped the StageName field to the Opportunity Stage input field, and from what I have read I have done it correctly, adding all the picklist oprions as choices.  
Jude ShimerJude Shimer
Hiya, I'm getting the exact same error as above, curious to see how folks who got their flow to work input the Prospecting stage value.

On my initial input screen, I have an "Opportunity Stage" picklist with only one value, "Prospecting," like this:
User-added image

Then on my Opportunity record creation, I have StageName mapped to the "Prospecting" picklist choice:
User-added image

Can't figure out why that's not working.
Biswa RayBiswa Ray
Hi Stephanie/laura/Judith,

While creating opportunity record please try to assign StageName as mentioned below,

StageName  = Prospecting  (Trick here is to select value from 'PICKLIST VALUES' not from 'CHOICES')


It should resolve this issue. I tried it for my trailead assignment and worked for me. I got full points. 

Hope it helps.

Manoj Kumar TiwariManoj Kumar Tiwari
Can i use formula for Company_Name + "-" + Last_Name?
  •    Instead, something like " {!Company_Name} - {!Last_Name}" should do. Its working for me.
CloseDate = Flow.CurrentDate (can I use Flow.CurrentDate + 30?)
  •    You may consider creating a variable of Date type and assigning it "TODAY() + 90"
Theodore RayTheodore Ray
I've having a problem with this challenge. when I save it I get a warning:

Activation Warnings (1) All issues must be fixed before you can activate this flow.
ClosingDate (formula): The formula expression is invalid: Formula result is data type (Date), incompatible with expected data type (Text).

I don't understand why the system is expecting the Text data type for this standard date field. Has anyone come accross a similar issue?

Many thanks!!


Kristen Putikka 9Kristen Putikka 9
I passed this challenge however when I look back at the records that are being created, none of them are being related to the other.  The contact page doesn't have the account filled in and the opportunity also doesnt have the account on it.  What did I miss or how would one make this work properly in a real life situation?

Lyndee WhittenLyndee Whitten
Maybe this will help someone else who is also very new to Flows... I was hung up for a while due to alerts being thrown when I saved my Flow. Basically, my first couple attempts at creating formulas to use in the Value were failures, but even after I created the used correct formulas, the alerts still appeared, referencing the old, incorrect formulas. I couldn't figure out how to delete them for the longest time. Then I clicked on the "Explorer" tab at the top of the left sidebar, and BAM, there they were. After deleting the bad formulas, I was able to save my Flow without any alerts and then Activate the Flow.