You need to sign in to do that
Don't have an account?

Stuck on Module 2 Trailhead - Create a flow to streamline entry of new accounts, contacts, and opportunities.
Please help! I am stuck on creating flows. Can't seem to work. I keep on re-doing my work and not sure if I am doing it right. The challlenge as follows:
To pass this challenge you will need to create a flow that implements the business process of Account, Contact, and Opportunity data entry and place it on a Visualforce page.The Flow will need to be called 'New Customer Flow'.
The Flow should have a screen with fields for First Name, Last Name, Company Name, Opportunity Amount, and Opportunity Stage.
The Flow needs to have steps to create an account, a contact, and an opportunity from the data entered.
Opportunity name, close date and stage are required fields. Name the Opportunity '{Company Name} - {Last Name}', set the close date to one month from today and set the stage to 'Prospecting'.
The Flow should be invoked from a Visualforce page.
The Visualforce page should be called FlowPage.
The Visualforce page will need a component to reference the 'New Customer Flow' process.
If possible, if you can provide a snapshot.
Thank you.
To pass this challenge you will need to create a flow that implements the business process of Account, Contact, and Opportunity data entry and place it on a Visualforce page.The Flow will need to be called 'New Customer Flow'.
The Flow should have a screen with fields for First Name, Last Name, Company Name, Opportunity Amount, and Opportunity Stage.
The Flow needs to have steps to create an account, a contact, and an opportunity from the data entered.
Opportunity name, close date and stage are required fields. Name the Opportunity '{Company Name} - {Last Name}', set the close date to one month from today and set the stage to 'Prospecting'.
The Flow should be invoked from a Visualforce page.
The Visualforce page should be called FlowPage.
The Visualforce page will need a component to reference the 'New Customer Flow' process.
If possible, if you can provide a snapshot.
Thank you.
Please refer the below screenshot..I have implemented the same and it is run perfect..
2.
3.
4.
Please check with these screenshot and let me know if it works for you...
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanks,
Sandeep
Salesforce Certified Developer
All Answers
Please refer the below screenshot..I have implemented the same and it is run perfect..
2.
3.
4.
Please check with these screenshot and let me know if it works for you...
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanks,
Sandeep
Salesforce Certified Developer
I slightly edited what I had to look at what you have provided (great snapshot, btw!). Now, I got an error: Challenge not yet complete... here's what's wrong: A Visualforce page named 'FlowPage' was not found.
This is for the last 3 bullets in the challenge:
1)The Flow should be invoked from a Visualforce page.
2)The Visualforce page should be called FlowPage.
3)The Visualforce page will need a component to reference the 'New Customer Flow' process.
I tried to do the steps from the module, but I don't understand. Can you please help again?
Thanks.
Connie Sintos
<apex:page >
<flow:interview name="New_Customer_Flow">
</flow:interview>
</apex:page>
Encountered unhandled fault when running process New_Customer_Flow/30190000000PWE0 exception by user/organization: 00D900000010GY8/{4}
UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [StageName] --- for SFDC record with ID : null,
caused by element : FlowRecordCreate.Create_Opportunity
caused by: UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [StageName] --- for SFDC record with ID : null,
Salesforce Error ID: 1551753124-13136 (-1680723869)
:( Not sure what I'm doing incorrectly.
We are getting the same error which you have faced please provide the solution as you figured it out.
UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [StageName] --- for SFDC record with ID : null,
[Error] Error: FlowPage line 2, column 27: Open quote is expected for attribute "name" associated with an element type "flow:interview"
[Error] Error: Open quote is expected for attribute "name" associated with an element type "flow:interview".
<apex:page>
<flow:interview name = “New_Customer_Flow” />
</apex:page>
Please help.
@ros - How did you figured it out?
I am not able to put prospecting in stored value.
If you have this error:
UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [StageName] --- for SFDC record with ID : null,
Refer to this article: https://help.salesforce.com/apex/HTViewSolution?id=000044625&language=en_US
You must go to stored values (from your screen) and type in the choice with no brackets and just text. This worked for me.
ANWER FOR following message
UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [StageName] --- for SFDC record with ID : null,
the error is telling you that, you didn't provided value to Opportunity StageName and Account field in opportunity. Make sure you have this setup while Create Opportunity selection
How to provide relations among (Account and Contact ) or (account and Opportunity)
1) While creating account, bottom of the edit page you will see "Assign the record ID to a variable ...."
2) in Field variable, select option CREATE NEW.
3) select VARIABLE option - give a name to vairable like "CreatedAccountID" and Select default option to "ID" ( what you are trying to do?, untill this step you are capturing the account id for the new record which created and assinging it to a variable called "CreatedAccountID")
4) Now when you are creating a new record for Contact ot Opportunity, In Assignments select account ID and assigng value "CreatedAccountID" . This way you are trying to provide relation to your parrent record.
Although Salesforce trailhead automated script doesn't validate "Opportunity Name" and you will clear the challenge even you don't include this Last Name.
But this can be achieved using below formula:
- Create a formula from Resources tab
- Give a unique Name and then use below code to concatenate these two fields
{!Company_Name} + '-' + {!Last_Name}
- Now use this formula on the Opportunity create window under assignments section --> Formulas --> select Formula Name that you have created in above step.
"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."
The screen shots where very useful. created the screen and three records resp for Accounts, Contact and Opportunity.
In the Visual Force Page entered the
First Name
Last Name
Company Name
Opportunity Amount
Opportunity Stage(Dropdown list value "Prospecting")
Thanks,
I was stuck on this exercise for ages but then found this Thread and the screenshots were just perfect. I was able to complete the exercise and pass the Check. Thank you for sharing this info.
Regards,
Colm
INSERT --- INSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [Name],
Help?
Hello Everyone,
Thanks to @Rajneesh Ranjan 23 to help me in solving the syntax error in the Opportunity name from Screen Input Data.
Here what i did to pass this challenge





1. Adding screen on the canvas
2. Add Name, Unique name
3. Select Add a Field Tab, Add Textbox to Rightside for First Name, Last Name and Company Name.
4. Add Currency for Opportunity Amount.
5. Add Dropdown List for Opportunity Stage
Conti.......!
7. For Opportunity Stage Dropdown List select Picklist Choice
And Set PICKLIST CHOICE as
8. Now add Record Create element from Palette on Canvas for creating Account, Contact and Opportunity
9. Double click first record element and fill as follow
11. Double click third Record Create element and fill as follow for opportunity
Add screen input for Amount
And for Close Date and Opportunity Name
Select formula for CloseDate and Opportunity Name. You can create Formula by selecting CREATE NEW-->formula
For CloseDate formula
For Opportunity Name Formula
This is all for Flow Setting
Now invoking this to Visualforce Page.
Continue.......!
Go to Setting search Visualforce Page in Quickfind box,
Select New
For adding to Visualforce Component
Search Visualforce Component in Quickfind box
On Visualforce Component, Create New
Use same code for both Visualforce Page & Component
<apex:component >
<flow:interview name="New_Customer_Flow" />
</apex:component>
REGARDS,
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!!
Theodore
This is the message I get.
Here's what I've set up:
I've done the closing date as a date formula fieldd with the formulation as above (current datee+30) as shown in slide 11 of the post of 26th April 2016.
Please let me know if you need more screens or info?
Many thanks!
Theodore
I still can't get the date formula to work. I do the Flow current date + 30, but I get an error about expected format of text.
Also, I was driving myself crazy about this: It seems that 3 distinct records are created - Account, Contact, and Opportunity. I kept thinking they should be related, and have cross connections (the Account would have the contact, and the contact would have the account listed, and the opportunity would be listed in the Account). Is that possible, or does it come up in a later module?
I am also getting this message when I try to run the flow - "An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information."
When I checked my email this is the error -
An error occurred at element Opportunity (FlowRecordCreate).
INSERT --- INSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Required fields are missing: [Discount_Percenet__c]
I followed the screen shots exactly (thank for those), so I'm not sure what this means. Any ideas?
Thanks
Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: TCBPLASJ
I found good video for completing this challenge.
In the Opportunity Object
1. The Opportunity Name should be dynamic. So we need choose formula
{!OpportrunityName}+"-"+{!LastName}
2. Opportunity Close date also should be dynamic. So we need to select formula
{!Flow.CloseDate}+30
Please check the below link for detailed procedure
https://www.youtube.com/watch?v=Rm0oFxhWuO4
I am getting the same problem as you Heidi King. I passed the challenge, but to effectively make this flow work in the real world it would be nice to know how the three records can link within a flow. Does anybody know how to do this?
From Setup, enter Lightning App Builder in the Quick Find box, then select Lightning App Builder.--> click on "New" --> It will open lighting ui --> Select "Home Page" --> Click "Next" --> Give label name "Demo home" --> click on "Finish" --> Drag and drop vf component --> Click on "save" -->click on "Activate" --> Select "Set this page as Default Home page" --> click "Next" and Activate .
Please follow these steps:
1. Go to Lightning App Builder from Setup
2. Check if there are multiple Home Page Lightning pages. If Yes, then delete the other ones.
3. After deleting the others, make sure the only Home Pag has the flow you created for the trailhead challenge.
Hope this wil solve ur problem...