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
Aron Schor [Dev]Aron Schor [Dev] 

Problems with Automating Processes with Flow challenge/example

I completed the example and the challenge but it doesn't seem to be working 100% or I am missing something.

For the Example, if I create a tab for it is says

java.lang.reflect.InvocationTargetException
Error is in expression '{!componentBody}' in component <apex:page> in component interview.apexc
when I go to the tab.

For the Challenge, if I create a tab and enter this information
First Name John
Last Name Smith
Company Name Misc Co
Opportunity Amount 100
Opportunity Stage Prospecting

It says
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.

Thanks.
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Aron Schor 5:

 Opportunity Name, Opportunity CloseDate were mandatory to save an opportunity record, so try inserting some dummy values into those two fields. :)

Thanks,
Balaji
Aron Schor [Dev]Aron Schor [Dev]
Hi Balaji,

It says:
"The Flow should have a screen with fields for First Name, Last Name, Company Name, Opportunity Amount, and Opportunity Stage."

Should I also include these fields there as well?  I think I added them to a different section.

"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'."

Thanks Aron
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Aron Schor 5:

 This is what i did:

 I didnt add any additional fields other than those specified in the Challenge. But, when configuring the record create action for opportunity, i configured in the below way:

User-added image


Accountid is a varaible i created which will have the id of account that was inserted as part of flow. amount,stagename are the fields specified in the challenge. Close date i just given flow.currentdate which is equivalent to Today()!


and one more thing is make sure while adding drop down values for stagename as below

User-added image

for each choice, 
User-added image

you enter the stored value property with actual opportunity stage name.


Hope this helps:

Thanks,
balaji
Aron Schor [Dev]Aron Schor [Dev]
Still having some problems.

If I Select Amount, I can't select Screen Input Fields, only "Create New"
If I Select AccountId, it won't let me choose from Screen Input Fields.  Oddly, I see {!Opportunity_Amount} and a few other options.

Aron
goabhigogoabhigo
Hi Aron, were you able to solve it? I have cleared all the Trailhead challenges/modules. I can help if not solved.

--
Abhi
Aron Schor [Dev]Aron Schor [Dev]
Hi, I completed it but I had some problems with the examples.  Its really not urgent now, not sure what was happening.  Thanks Goabhigo.
Clayton Thomas 4Clayton Thomas 4
I couldn't quite get the flow setup the way I should either, but I was given 500 points for trying regardless :/
CNishantCNishant
@balaji

Not able to put Prospecting in stored value
Renay ReadetteRenay Readette
this one has been giving me fits too! it says "set the close date to one month from today" - shouldn't that be some kind of date formula? (Today) + Month - made that up but am i on the right track? or am i making it too hard? lol Thanks!
Lisa King 4Lisa King 4
I used Today + 30 (which is 30 days) and it worked.
Michal KaparMichal Kapar
I didi it like Balaji Chowdary Garapati and its pass and Opportunity_stage was text only. But date is today. not Today + 30 .  Its not working for me. What is the correct version to add one mounth?
Johnny Knox 13Johnny Knox 13
I am trying to figure out the date + 30 days as well.  Seems like a bit confusing for my level of understanding of coding in Salesforce.  Anybody know?
David austinDavid austin
If you want to do it the date the right way, select formula, call it whatever you want, select DATE as the type ... and go here to figure out the logic: https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_functions.htm
Bookmark that page ... invaluable resource.
You'll want to return a Date ... and there is a function DATE(year,month,day).  If you add 1 to the month, like this: DATE(year,month+1,day), you'll be on the money.  Now... to be honest, I'm not sure this is a good idea, because what if it is the 31st and there are only 30 days in the next month ... I have not checked that use case yet, but so far it work for me.  The total formula is (and all the commands from this are from that link I show above):
DATE(YEAR(TODAY()),MONTH(TODAY())+1,DAY(TODAY()))
David austinDavid austin
As a side note ... I think it's pretty lame that they don't at least give you the training needed to finish this challenge before you take the challenge (ie. how to do the date).  So I don't feel bad at all about giving that info here.
AD RokaAD Roka
are we creating three records one for account one for contact and one for opportunity? or are we creating it all under one record? Sorry i am a beginner to the salesforce and I skipped all the trails after the very first 2 of beginner level. I was told that I should start learning the flows right away.  Any help is appreciated.
Cheers
David austinDavid austin
AD Roka - yes you are creating 3 records.  Note that my recommendation for the DATE formula is not a good recommendation.  I wish I could go back and edit my comment there because during the month of december it won't work because MONTH(TODAY())+1 equals 13, and there is no such thing as a month 13, and the year will be wrong too (needs to increment by 1 year). Instead (assuming today is December 28,2016) just use DATE(2017,1,28) ... which is 1 month from today.  This formula, of course, will only work for the day in which you enter it, but for purposes of passing the challenge it will work.