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
Praveen Gupta 57Praveen Gupta 57 

process automation superbadge challenge 7

Challenge Not yet complete... here's what's wrong: 
The Robot Setup Day of the Week formula does not seem to be working properly. The Day of the Week should not fall on Saturday or Sunday.


Please help me
NagendraNagendra (Salesforce Developers) 
Hi Praveen,

Please follow below steps using which I have cleared the challenge.
  • Change field type of field “Day of the Week” on robot object to formula text and use below formula.
  • CASE( MOD( Date__c – DATE(1900,1,6),7) , 0, “Saturday”,1,”Sunday”,2,”Monday”,3,”Tuesday”,4,”Wednesday”,5,”Thursday”,6,”Friday”,””)
  • Go on Process builder created in step 5.(You have to clone this Process Builder in order to make changes)
  • Go on 4th Node of closed Won opportunity.
  • Go on action create setup to record.
  • Change formula of date field from [Opportunity].CloseDate + 180..
  • to
  • CASE(MOD([Opportunity].CloseDate + 180 – DATE(1900, 1, 7),7), 0, [Opportunity].CloseDate + 181, 6, [Opportunity].CloseDate + 182, [Opportunity].CloseDate + 180)
  • Save and activate.
For more information please refer to below links. Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
john houser 5john houser 5
After changing Day_of_the_Week__c formula and the Opportunity Won process builder node formula as well as creating the process builder for the change in the Robot_Setup__c record, I still couldn't get this to validate.  I noticed in the debug logs that the 7 opportunities that were expected had an Account Type of null actually and that Robot_Setup__c records were not being created, I added to the Opportunity Won node the entry criteria that the Account Type was null and challenge 7 validated and I got my badge.  It is sad that there have to be workarounds to validate these in Trailhead.
MPB SalesforceMPB Salesforce
Hi all if you have any query in this challenge 2 so please watch this video at least once i hope you will get your solution

https://www.youtube.com/watch?v=E7ZExWd-7_Q&list=PLQf_Kv-dMRBJNdXFH44hPImsHY47yaG12&index=3

if you get solution so please select best answer
Brian KnezekBrian Knezek
For me the solution was to initially create the Robot Setups with a date that is 180 days after the Opp.CloseDate. This requirement was not made clear in the earlier challenges and I initially had the Robot Setups creating with a Date 180 days after TODAY() -- and the challenge verification passed.  The problem this created was that in this final challenge, when the Trailhead Tester created 7 Opportunities, every resulting Robot Setup had the same Day Of the Week - and that is not what Trailhead is expecting when it runs the test for this final challenge.

The Trailhead Test Class that verifies the challenge is creating 7 Closed Won Opportunities with CloseDates that each increment by 1 day. Their assumption is that the resulting Robot Setups will also have Dates that each increment by 1 (except that they are immediately updated by another Process Builder that should push the Saturday and Sunday Dates to land on Monday).  Ultimately, the verification will loop through the 7 resulting Robot Setups and expects to find that 3 of them have Monday as the Day of the Week.