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
Alhad DeshpandeAlhad Deshpande 

Process Automation Specialist Superbadge - Step 2 - #Automate Accounts

Hi,
I am stuck in Step 2 (Automate Accounts) . I am getting below error message.
Challenge Not yet complete... here's what's wrong:
Please check the configuration of the custom fields on the Account object. The formulas, rollup summaries, etc. did not produce the expected outcome.

I have Created Custom Fields as below
Number of deals, Number_of_deals__c --> Roll-Up Summary (COUNT Opportunity)     
Number of won deals, Number_of_won_deals__c --> Roll-Up Summary (COUNT Opportunity) with filter criteria of Closed Won
Amount of won deals, Amount_of_Won_Deals__c --> Roll-Up Summary (SUM Opportunity) with filter criteria of Closed Won
Last won deal date, Last_won_deal_date__c --> Roll-Up Summary (MAX Opportunity)
Deal win percent, Deal_win_percent__c - Formula --> IF ( Number_of_deals__c > 0, (Number_of_deals__c / Number_of_won_deals__c ), 0))
Call for Service, Call_for_Service__c - Formula --> IF(OR(TODAY() - 730 > Last_won_deal_date__c , TODAY() + 730 < Last_won_deal_date__c ), 'Yes','No')

Also my Validation Rules are configured as :
For Account Name Edit Validation - Created 2 Validation Rules
ISCHANGED( Name ) && ISPICKVAL(Type, "Customer - Channel")
ISCHANGED( Name ) && ISPICKVAL(Type, "Customer - Direct" )

For Billing State/Province Validation Rule is
NOT(
CONTAINS("AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:" &
"IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:" &
"NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:" &
"WA:WV:WI:WY", BillingState))

For Billing Country Validation Rule is
BillingCountry <> "US" && BillingCountry <> "USA" && BillingCountry <> "United States" &&  NOT( ISBLANK(BillingCountry ) )

Same Validation rule are set for Shipping State/Province and Shipping Country (with correct field name).

Can anyone help me with this????
Best Answer chosen by Alhad Deshpande
Pradeep SinghPradeep Singh
Hi, Please check the formula for Deal win percent, Deal_win_percent__c - Formula --> IF ( Number_of_deals__c > 0, (Number_of_deals__c / Number_of_won_deals__c ), 0)),

It should be IF ( Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c ), 0)),

All Answers

Pradeep SinghPradeep Singh
Hi, Please check the formula for Deal win percent, Deal_win_percent__c - Formula --> IF ( Number_of_deals__c > 0, (Number_of_deals__c / Number_of_won_deals__c ), 0)),

It should be IF ( Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c ), 0)),
This was selected as the best answer
Alhad DeshpandeAlhad Deshpande
Completed Challange
That Worked !!!!!!!!!!
Amitesh PataraAmitesh Patara
This is the main error I am getting "Challenge Not yet complete... here's what's wrong:
Please check the custom fields on the Account object. Not all custom fields were found." ......Then someone told me to correct formula in field in Call for service but then again I am getting Syntax Error 
"Error: Field Last_won_deal_date__c may not be used in this type of formula" ....I donno what to do..Please give me solution..
Ananya KachawaAnanya Kachawa
@Pradeep Singh

ERROR: 
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: FIELD_CUSTOM_VALIDATION_EXCEPTION, All in one error: []

I clubed all the validation rule formula into one Rule called: "All in one error"

But I am getting this same error. 

NOTE: I tried creating seperate 5 Validations rules also(Billing state&&country, Shipping State&&country and AccountNameEdit), it did not work either !!!
PX AdminPX Admin
for "Call for Service" custom field, I created a text formula field with the below formula:

IF((TODAY() - Last_won_deal_date__c >= 730), 'Yes','No')

looks like it worked :)
Arjun Singh 63Arjun Singh 63
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: FIELD_CUSTOM_VALIDATION_EXCEPTION, Amount cannot be less than 5 k in an opportunity: []



can someone please help me with this!
 
Mohammed Mehran R 5Mohammed Mehran R 5
please go through this it will definitely help you - https://www.youtube.com/watch?v=5s5KLbPXGRY
Mars Rover 1786Mars Rover 1786
I have errorr.
Challenge Not yet complete... here's what's wrong:
A validation rule did not prevent a new Account from being saved when Shipping Country is blank and Shipping State has three characters.
ShaiffShaiff
Hi Mars,
You can use this,

(((LEN( ShippingState ))>2) && (ShippingState <> 'US')) || (((LEN( BillingState ))>2) && (BillingState <> 'US'))
||
NOT(
OR(ISBLANK(ShippingCountry),ShippingCountry = 'US',ShippingCountry = 'USA',ShippingCountry = 'United States')
) ||
NOT(
OR(ISBLANK(BillingCountry),BillingCountry = 'US',BillingCountry = 'USA',BillingCountry = 'United States')
)

Works fine for me!
Kota Saketh 7Kota Saketh 7
IF( DATE( YEAR( Last_won_deal_date__c)+2 , MONTH( Last_won_deal_date__c) ,DAY( Last_won_deal_date__c)) <=TODAY(), "YES", "NO")
when I am using this i am getting error please help me
Gayathri GowrishankarGayathri Gowrishankar
Hi.
Just know i complete this challenge, same error i got more than 3 days, today finally i completed this challenge,
1.check the field level security access give tick mark visible to all the fields, each field they will ask the tick for visible r read only, click visible.
2.Call on service apply this formula :
IF(OR(TODAY() - 730> Last_won_deal_date__c,TODAY()+730 < Last_won_deal_date__c ) ,'Yes','No')
3.Deal with %- check data type after formula assign choose percentage.
4.very very important in ur field u have total won deals, delete that field, otherwise error can through.
5.Last very important check each and every field criteria CLOSED WON,