+ Start a Discussion
goabhigogoabhigo 

Error in challenge - Automating Processes with the Lightning Process Builder

The process works fine, I have tested it. When I click on "Check Challenge", this is what I get:

Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID 3012800000001r1. 
Contact your administrator for help.: []

 
Best Answer chosen by goabhigo
goabhigogoabhigo
I found the solution: I need to always check if the foreign key is null. 
Its in Knowledge artcile - https://help.salesforce.com/apex/HTViewSolution?id=000212174&language=en_US.

Trust this helps anyone who encounters similar issue.

--
Abhi

All Answers

goabhigogoabhigo
Ok, I got an email too. This one talks about Process:
Encountered unhandled fault when running process Update_Contact_Address/3012800000001r1 exception by user/organization: 00D28000000HDTJ/{4}

The flow failed to access the value for myVariable_current.Account.ShippingStreet because it hasn't been set or assigned.

caused by element : FlowDecision.myDecision

caused by: The flow failed to access the value for myVariable_current.Account.ShippingStreet because it hasn't been set or assigned.

Salesforce Error ID: 459369454-30911 (-998997044)

--
Abhi
Sandeep BhanotSandeep Bhanot
Abhilash - looks like your Flow is encountering an error when it is executed. Make sure that the flow runs successfully before you try verifying the challenge. A simple way to test would be to insert or update an account record and see if its child Contact records get the matching mailing address field values. Thanks
Sandeep
goabhigogoabhigo
Yes Sandeep, the flow works fine when tested. It is copying the Shipping Address from Account to Mailing Address of Contact. No problem.
But in Trailhead I get this error. As I mentioned in Twitter, I will do this in another DE where there is no Flow.
I will post the update soon.
Thanks for your help :)
goabhigogoabhigo
Still no luck Sandeep. I get the same error.
As I mentioned above, I also get an error email. What is happening? Can you please help?

--
Abhi
goabhigogoabhigo
Ok here is what I see. When I test it by updating/inserting Contact, it works fine. I do not get any error email. BUT when I click on Recheck Challenge button in Trailhead, I get this error email.
Encountered unhandled fault when running process Update_Contact_Address/30190000000LMCE exception by user/organization: 00D90000000HsMF/{4}

The flow failed to access the value for myVariable_current.Account.ShippingStreet because it hasn't been set or assigned.

caused by element : FlowDecision.myDecision

caused by: The flow failed to access the value for myVariable_current.Account.ShippingStreet because it hasn't been set or assigned.

Salesforce Error ID: 1510368240-41636 (-1742205319)


Please let me know the root cause of the issue.

--
Abhi
goabhigogoabhigo
I found the solution: I need to always check if the foreign key is null. 
Its in Knowledge artcile - https://help.salesforce.com/apex/HTViewSolution?id=000212174&language=en_US.

Trust this helps anyone who encounters similar issue.

--
Abhi
This was selected as the best answer
George CookGeorge Cook
I was having problems with this challenge even though I was doing it correctly. Showing many CANNOT_EXECUTE_FLOW_TRIGGER errors.

This answer worked for me, got it from another thread on the same topic.

User-added image

https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BMFVIA4
Andrew LokotoshAndrew Lokotosh
(Solved)
Hello everyone!
Today i actually spent all day to solve this stupid problem)
First of all thanks everyone who tried to help each one with this error.

If you  deactivate the validation rule created from a previous challenge, and this didn't help
the next step for you!

Can you make sure that:

1. All five parts of the Shipping Address on Accounts are covered under the criteria.
2. For the Conditions part , you have chosen AND.
3. All five parts of the Mailing Address on Contacts are covered under the Update records action and the Type us Reference for all field values.

Also a little image Hint!


This is for each one criteria position ((Street, City, State, Post Code, Country))
Good luck, and have fun!
User-added image
User-added image
Hugo Mario Zuleta OrtegaHugo Mario Zuleta Ortega
@Andrew Lokotosh brilliant solution, changing String to Reference.
Force CraigForce Craig
Thank you Andrew for your solution.  That helped me uncover my issue with this challenge!  One thing to note is that it does work when the condition on the Define Criteria for this Action Group is set to "Any of the conditions are met (OR)".  You mentioned above to set it to AND, but it makes sense to set it OR because perhps only one of the fields on the address is changing.  Thanks again!
User-added image
Dan Watkoski 5Dan Watkoski 5
I am also having this issue come up.

I initially had more conditions where it checked to see if the Account address was not null, but took those out after seeing that none of you used them, and it was obviously not imperative to the challenge. It appears to me that I have the same set up, and I do not have the validation rule on contacts that should be holding this up. 

My error

This is the error that I got, and for the life of me, I can't figure it out.
sonia singh 7sonia singh 7
I am working on the Process Builder trailhead.I implemented the solution in my developer org and tested it as well but when I check the challenge it is giving me below error 
 
Challenge Not yet complete... here's what's wrong: 
An update to an account record failed to update the mailing address fields of all child contact records. Make sure that the process is correct and that it is activated.


I am struck on this since the last one day.I have tried all the solutions offered on the various Salesforce communities but still no sucess
 
Can anyone please help me find out where I am going wrongProcess Builder Screenshot_1

Process Builder Screenshot_2
Shukla YogeshShukla Yogesh
Hi Soniya

I could compare with mine process and all looks fine. Only thing could be you are doing some wrong mapping between Account Shipping Address fields and Contact Mailing Address Fields. Can you please cross check again as names are quite similar of all address fields.

Thanks
Yogesh
sonia singh 7sonia singh 7
Thank you Yogesh for looking into it.
My issue is resolved now.I was not able to complete the challenge as I had used Shipping PostalCode in place of Shipping Zip/PostalCode.
Once I corrected it , I was able to pass the challenge.

Thanks
Sonia Singh
Dan Goldman 2026Dan Goldman 2026
The error is in the developer account seed data. All the address fields were populated in the multi-line text field instead of the individual address fields in both the account and contact records. Once I fixed that for an account (Genepoint) the process worked perfectly.
Uttam Sai Raj BodaUttam Sai Raj Boda
Hi Guys,

Those who are Strucked with the Trailhead "Process Automation-Automate Basic Business Processes with Process Builder " Module, Please follow this process then you will get Successful completion of that module.

Go to->Setup->Type 'Process Builder' Quickfind then click on Process Builder->You Will get a Window as below-> Click NEW
User-added image
User-added image
Name the Process and select the Option for The Process Starts When->A Record Changes->Then follow the Process as per Screenshots
User-added image
User-added image
User-added image

Finally Activate the process and before activating Please Deactivate the Validation rules on Contact Object, you will get Successful completion of challenge.

Note: Please follow the process as per screenshots.

Thanks&Regards,
Uttam.
shashi kumar 58shashi kumar 58
Hi All,
Finally i cleared the below challenge 

Please find the below ans for Superbadge
Lightning Experience Specialist Challenge no#4

1. Process Builder Name:- Fulfillment Creation

2. Object - Adventure Package
Start Process- Only when a record is created 

3. FIRST NODE 

Define Criteria for this Action Group 

Criteria for Executing Actions - Conditions are met 

Set Conditions:

1. [OpportunityLineItem].Oppotunity.StageName Does not equal Cancelled 
2. [OpportunityLineitem].Fulfillment_Created_c Equals True

Conditions - All of the conditions are met (AND) 

IMMEDIATE ACTIONS 

1. Create a Record 

Record Type - Fulfillment 

Set Field Values 

AdventurePackageId -  Reference -[OpportunityLineItem].Id
Adventure Package cost - Reference - [OpportunityLineItem].TotalPrice 
Adventure - Reference -  [OpportunityLineItem].Product2Id
Expedition Leader - Reference -[OpportunityLineItem].Product2.Expedition_Leader_c
Explorer - Reference - [OpportunityLineItem].Explorer__C
Fulfillment Name - Formula -[OpportunityLineItem].Product2.Name + [OpportunityLineItem].Id
Opportunity-Field Reference-[OpportunityLineItem].OpportunityId
Schedule Date -Reference - [OpportunityLineItem].ServiceDate
Status- Picklist - New 

NOTE :-Package is not required so, please don't include here

Package -  [OpportunityLineItem].OpportunityId

Step 2. Update Records 

Record - [OpportunityLineItem]

Criteria for Updating Records - No criteria-just update records 

Set new field values for the records you update 

Fulfilment Created = True 

Note no need to include then below fields in this section:-Please don't confuse


Needs Insurance - Reference- [OpportunityLineItem].Product2.Needs_Insurance_c
Needs waiver - Reference -  [OpportunityLineItem].Product2.Needs_Waiver_c



Step 3. Update Records

Record - [OpportunityLineItem].Opportunity ID 

No criteria just update records 

Set new fields for the records you update 

Needs Insurance -Reference- [OpportunityLineItem].Needs_Needs_Insurance_c
Needs Waiver - Refernce -  [OpportunityLineItem].Needs_Waiver_c


Step 4. Create Task 

Action Name:- TASK
Record Type:- Task

Set Field Values:-

Reminder Set-Boolean-True
Assigned to ID - reference- [OpportunityLineItem].Opportunity.Owner.Id
Priority - Normal 
Status - Not started 
Related to ID - reference - [OpportunityLineItem].Exploter_c
Subject- String - any sentence you choose to explain the task 

Click on Save


Step 5. SCHEDULED ACTIONS 

14 Days from now 

Step 6. Click on Add ACTIONS

Action Name:- Post to Chatter

Post to:- User, User-Select a user from a record :- [OpportunityLineItem].Opportunity.Owner.Id

Message:

{![OpportunityLineItem].Opportunity.Name}

{![OpportunityLineItem].Product2.Name}

{![OpportunityLineItem].Id}

Step 7:- Click on Activate

Open developer Console

Click ->Debug->open Execute Anonymous Window-->Paste the below code select those code and Execute Highlighted

Product2 product = new Product2(name='Half Dome Hike', isActive=true); 
insert product; 
//insert the pricebookentry 
Pricebook2 stdPrice = [Select id from Pricebook2 where isStandard=true limit 1]; 
PricebookEntry pbe = new PricebookEntry( IsActive = true, Product2Id = product.id, UnitPrice = 2.00, Pricebook2Id = stdPrice.Id); 
insert pbe;

Please follow the above steps you can clear your challenge 

Please like if you are able to pass.

Regards,
Shashi Kumar
 
Pandy sundar VPandy sundar V
what are the steps to open a developer console? 
 
el hadji mory ndaw 6el hadji mory ndaw 6
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Automate Opportunities” process failed. Give your Salesforce admin these details. 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. Error ID: 1393685039-902196 (-1323845011): []