You need to sign in to do that
Don't have an account?
Elie.Rodrigue
Process Automation Specialist Step 2
The call for service field description in the requirement is way different than what trailhead is actually validating.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I am also having issue in this step, but the error message is different
As per the requirement, I have initially created following fields
Deal win % (Percent), Last won deal date (Date), Number of deals (Number), Number of won deals(Number), Total amount of won deals (Currency) and Call for Service (Formula) as below:
IF((Today() - Last_won_deal_date__c) / 365 > 2, 'YES', 'NO')
But on submit, I got the above error.
Then I have removed all the fields except Call for Service, and recreated all of them as their name defines, like below:
Number of deals (Roll-up summary): Count of related opportunities without criteria
Number of won deals (Roll-up summary): Count of related opportunities having Stage equals Closed Won
Deal win % (Formula): IF( Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c), 0)
Total amount of won deals (Roll-up summary): Sum of Amount of related opportunities having Stage equals Closed Won
Last won deal date (Roll-up summary): Max of Close Date in related opportunities having Stage equals Closed Won
I have manually tested everything, they are working fine.
But after doing all these changes, I got the exact same error message :). No Luck!!!
Atleast your error message looks a bit close to the solution, so can you please tell me what you have done from your end.
My Call for Service is as follows
It's pretty ridiculous, but it got the job done. Looks like there are some major discrepancies between the requirements and the validations Trailhead is doing..
I have created a new SFDC org and created Account fields: Deal win % (Percent), Last won deal date (Date), Number of deals (Number), Number of won deals(Number), Total amount of won deals (Currency) and Call for Service (Formula) as below:
IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')
I have given the exact API names to the fields also as mentioned in the step2. But still getting below error:
In the debug log, I found it executes an anonymous code, which also ran successfully.
Can anybody tell me, where I am doing wrong?
Make sure your API names are correct as per the requirements:
Deal_win_percent__c
Amount_of_Won_Deals__c
Yes, I have created with exactly same API Names. Please find the below screen shot:
It's not your formula, just used
IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')
and passed through
Number of deals -> type rollup summary, you need to count the opportunities
Number of won deals -> type rollup summary, you need to count the opportunities which stage equals closed won
Last won deal date -> type rollup summary, you need get the max close date which stage equals closed won
Deal win percent -> type formula percent, just do number of deals won divided by the number of deals
Amount of won deals -> type rollup summary, the sum of the amount which stage equals closed won
Call for Service -> type formula text, IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')
Kind Regards
'Number of deals' and 'Number of won deals' fields, for these rollup summary fields you don´t have to apply the SUM operation, just select COUNT. I applied it to the Quantity field, that was wrong.
when I use this formula I am getting following error.
Error: Incorrect parameter type for operator '>'. Expected Date, received Number
can anyone help on this?
I figured out my problem. I did mistake in creating the field "Last won deal date".I didn't do Max close date.
Number of deals (Roll-up summary): Count of related opportunities without criteria
Number of won deals (Roll-up summary): Count of related opportunities having Stage equals Closed Won
Deal win % (Formula): IF( Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c), 0)
Total amount of won deals (Roll-up summary): Sum of Amount of related opportunities having Stage equals Closed Won
Last won deal date (Roll-up summary): Max of Close Date in related opportunities having Stage equals Closed Won
Call for Service (Formula) as below:
IF((Today() - Last_won_deal_date__c) / 365 > 2, 'YES', 'NO')
my error in this challenge was, hather tan Call for service is a formula field . I Created it as checkbox and made a process builder for updated.
PS i have completed the prerequisites of setting up the following steps to unlock the challenge
User creation
Step 1
Step 2 - Approval Settings
Step 3 - Install Package as mentioned in the superbadge
Step 4 - Queues creation
Step 5 - Lead Assignment
Step 7 - Lead validation rules for state and country
Step 8 - Country Validation
Step 9 - State Validation
I had the same issue and I followed all the recommendations from @Carlo Volpi
Thank you.
https://www.youtube.com/watch?v=e-exf-MUWzU&list=PLQf_Kv-dMRBJNdXFH44hPImsHY47yaG12&index=5
Amount of won deals, Amount_of_Won_Deals__c
the field name should be Total Amount of Won Deals and the API name should be Amount_of_Won_Deals__c
Trickey as it wasn't stated by trailhead.
1.Create Validation Rules:
OR(
AND(
LEN(BillingState) > 2,
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 ))
),
AND(
LEN(ShippingState) > 2, 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', ShippingState))
),
NOT(OR(BillingCountry ='US',BillingCountry ='USA',BillingCountry ='United States', ISBLANK(BillingCountry))), NOT(OR(ShippingCountry ='US',ShippingCountry ='USA',ShippingCountry ='United States',ISBLANK(ShippingCountry)))
,
AND(( ISPICKVAL( Type , "Customer - Channel")),ISCHANGED(Name)),
AND(( ISPICKVAL( Type , "Customer - Direct")), ISCHANGED(Name))
)
The above formula fulfills the State/Country validation and the Customer Type Validation.
2.Create the following Custom fields
i.Number_of_deals__c
type – rollupSummary
count of all opportunities
ii.Number_of_won_deals__c
type – rollupSummary
count the opportunities which are having the stage equals closed-won
iii.Last_won_deal_date__c
type – rollupSummary
Max of opportunities closeddate which are having the stage equals closed-won
iv.Deal_win_percent__c
type -Formula (Percent)
Number_of_won_deals__c / Number_of_deals__c
v.Amount_of_Won_Deals__c
type – rollupSummary
the sum of all opportunities amount which is having the stage equals closed-won
vi.Call_for_Service__c
type -Formula (text)
IF(DATE(YEAR(Last_won_deal_date__c)+2,MONTH(Last_won_deal_date__c),DAY(Last_won_deal_date__c))<= TODAY(),"Yes","No")
Note: (Last_won_deal_date__c)+2 inculded in the formula because the year can be leap/normal so doing total number number of days will not help.
Hope the above steps will help to clear the challenge 2.
IF(ADDMONTHS( Last_won_deal_date__c ,24) < TODAY() , 'Yes', 'No')
My problem was that I thought that Amount of won deals is the number of deals in Closed Won stage.
I solve it changing the rollup summary count to sum the amount per Opportunity.
Thank everybody for the help!
Incorrect: IF(Number_of_deals__c > 0, (Number_of_deals__c / Number_of_won_deals__c), 0)
Correct: IF(Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c), 0)