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
arvind bhandari 8arvind bhandari 8 

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

Please help me in this trailhead challenge, 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.

even after error the contacts and accounts are created but not opportunity.... error is given below:

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

i have given stagename value = stagename screen choice 

Please help me out

User-added image

User-added image
User-added image

even if I am selecting stage name prospecting or screen choice Stage than also it always land me to error 
Best Answer chosen by arvind bhandari 8
Petra WolfPetra Wolf
Hi 
I just completed the challenge. I put a default value in the input screen like this:
input screen

I think it is important that the choice is configured correctly - especially the stored value as shown below

choice
Hope that helps

All Answers

AshishyadavAshishyadav

you have mapped the stage that correct but , when it is trying to creat opp and fetching the values the stagename must be blank 

{!stages} but be blank , it doesnt have any value to fetch

arvind bhandari 8arvind bhandari 8
why its that so it will fetch values from screen input fields ....and i read somewhere that you cannot change opportunity stage via workflow might be same rule apply here ......but this task is given in trail head.there is some way and till date i am not unable to figure it out 
Petra WolfPetra Wolf
Hi 
I just completed the challenge. I put a default value in the input screen like this:
input screen

I think it is important that the choice is configured correctly - especially the stored value as shown below

choice
Hope that helps
This was selected as the best answer
arvind bhandari 8arvind bhandari 8
@petrawolf many thanks now its working correctly. i forget to mention stored value in choice. i am thinkling like whatever we select in input choice it will create opportunity from that data . thanks for help
Craig StegerCraig Steger
How did you set the close date to one month from today in the Opportunity record?  That is where I'm getting hung up.