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
Suzi Simmons 30Suzi Simmons 30 

Trailhead challenge on lead quality formula field

Trailhead formula challenge for lead quality
It works when I click on the lead, but I can't pass the challenge:
Challenge Not yet complete... here's what's wrong: 
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.

here is my code:
field lead_quality_helper__c formula type number
IF( ISBLANK( Email    ) , 0,  1) +
IF( ISBLANK( Phone    ) , 0,  1) +
IF( ISBLANK( Company  ) , 0,  1) +
IF( ISBLANK( Title    ) , 0,  1) +
IF( ISpickval(Industry , ""), 0,1)

Here is the lead_quality__c field formula type text
CASE(Lead_Quality_Helper__c,
1, IMAGE("/img/samples/stars_100.gif", "1 star"),
2, IMAGE("/img/samples/stars_200.gif", "2 stars"),
3, IMAGE("/img/samples/stars_300.gif", "3 stars"),
4, IMAGE("/img/samples/stars_400.gif", "4 stars"),
5, IMAGE("/img/samples/stars_500.gif", "5 stars"),
IMAGE("/img/samples/stars_000.gif", "0 stars"))

Can anyone see what I am missing for the challenge?  It works just fine.
Thanks in advance

 
Best Answer chosen by Suzi Simmons 30
Amit Chaudhary 8Amit Chaudhary 8
Please check Namespace is enable in your org or not . Please check below Trailhead FAQ
1) https://developer.salesforce.com/page/Trailhead_FAQ

I think my work is correct, but the challenge verification is still giving me an error.
If you think you've completed the challenge correctly, but you are still getting errors, make sure that you are using a fresh Developer Edition that does not have a namespace prefix. (What is a namespace prefix?) If you are still having trouble, use the “Share Feedback” button in the footer or on the right column to send a support request.


Please try to create  new developer org without domain name and namespace  with same formula field

let us know if this will help you

Thanks
Amit Chaudhary

All Answers

CloudGeekCloudGeek
Hello Suzi,

Try this :
 
CASE(
      Lead_Quality_Helper__c, 
         1,   IMAGE("/img/samples/stars_100.gif", "1 star") , 
         2,   IMAGE("/img/samples/stars_200.gif", "2 stars"), 
         3,   IMAGE("/img/samples/stars_300.gif", "3 stars"), 
         4,   IMAGE("/img/samples/stars_400.gif", "4 stars"), 
         5,   IMAGE("/img/samples/stars_500.gif", "5 stars"), 
              IMAGE("/img/samples/stars_000.gif", "0 stars") 
)

 
CloudGeekCloudGeek
For Number Formula  (Lead_Quality_Helper__c) :
 
IF (ISBLANK (Email),0,1)+ 
IF (ISBLANK (Phone),0,1)+ 
IF (ISBLANK (Company),0,1)+ 
IF (ISBLANK (Title),0,1)+ 
IF (ISPICKVAL(Industry, ""), 0,1)

For TEXT Formula (Lead_Quality__c)
 
CASE( 
Lead_Quality_Helper__c, 
1, IMAGE("/img/samples/stars_100.gif", "1 star") , 
2, IMAGE("/img/samples/stars_200.gif", "2 stars"), 
3, IMAGE("/img/samples/stars_300.gif", "3 stars"), 
4, IMAGE("/img/samples/stars_400.gif", "4 stars"), 
5, IMAGE("/img/samples/stars_500.gif", "5 stars"), 
IMAGE("/img/samples/stars_000.gif", "0 stars") 
)


Also make sure , you added these fields to your Lead Layout Page Layout.
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000MJ5SIAW
2) https://developer.salesforce.com/forums/?id=906F0000000MIzjIAG
3) https://developer.salesforce.com/forums/?id=906F0000000DDaRIAW

Lead Quality Helper
IF(ISBLANK(Email) , 0, 1) + IF(ISBLANK(Phone) , 0, 1) + IF(ISBLANK(Company) , 0, 1) + IF(ISBLANK(Title) , 0, 1) + IF( ISPICKVAL(Industry , ""), 0, 1)

Lead Quality
IMAGE( 
CASE( Lead_Quality_Helper__c , 
1, "/img/samples/stars_100.gif ", 
2, "/img/samples/stars_200.gif", 
3, "/img/samples/stars_300.gif", 
4, "/img/samples/stars_400.gif", 
5, "/img/samples/stars_500.gif", 
"/img/samples/stars_000.gif"), 
"0 stars")
.....................
or
 
CASE(Lead_Quality_Helper__c,
1, IMAGE("/img/samples/stars_100.gif", "1 star"),
2, IMAGE("/img/samples/stars_200.gif", "2 stars"),
3, IMAGE("/img/samples/stars_300.gif", "3 stars"),
4, IMAGE("/img/samples/stars_400.gif", "4 stars"),
5, IMAGE("/img/samples/stars_500.gif", "5 stars"),
IMAGE("/img/samples/stars_000.gif", "0 stars"))



Let us know if this will help you

Thanks
Amit Chaudhary
 
Suzi Simmons 30Suzi Simmons 30
Thanks for your help, it still will not pass the challenge, although the page works perfectly.  I can't see what I have done wrong.  I have cut and paste every possibiltiy in all the answers, but no luck.  Here is what I see in my org
Lead fieldsPage layout exampe
 
Amit Chaudhary 8Amit Chaudhary 8
Can you please let us know what error you are getting now. Can you please share the screen shot
Suzi Simmons 30Suzi Simmons 30
This is the error:
Challenge Not yet complete... here's what's wrong: 
The Lead object does not display the formula fields correctly. Tip: check the requirements again and make sure you have the correctly forumlas and their values.


-------------------------------------------------------------------------------------------------------------------
Lead quality helper (Lead_Quality_Helper__c) field visible to all, read-only for all
Formula return type is number

IF( ISBLANK( Email ) , 0, 1) + 
IF( ISBLANK( Phone ) , 0, 1) + 
IF( ISBLANK( Company ) , 0, 1) + 
IF( ISBLANK( Title ) , 0, 1) + 
IF( ISpickval(Industry , ""), 0,1)
-----------------------------------------------------------------------------------------------------------------------
Lead Quality (Lead_Quality__c) field visible to all, read-only for all
Formula return type is text

CASE(Lead_Quality_Helper__c,
1, IMAGE("/img/samples/stars_100.gif", "1 star"),
2, IMAGE("/img/samples/stars_200.gif", "2 stars"),
3, IMAGE("/img/samples/stars_300.gif", "3 stars"),
4, IMAGE("/img/samples/stars_400.gif", "4 stars"),
5, IMAGE("/img/samples/stars_500.gif", "5 stars"),
IMAGE("/img/samples/stars_000.gif", "0 stars"))

Page layout display fine, responds to changes when I add or delete a relevant field's contents.
Page layout
Amit Chaudhary 8Amit Chaudhary 8
I just used above formula field and tested in my org and completed challenge successfull. Look like due to some other configuration you are getting issue.

User-added image
IF( ISBLANK( Email ) , 0, 1) + 
IF( ISBLANK( Phone ) , 0, 1) + 
IF( ISBLANK( Company ) , 0, 1) + 
IF( ISBLANK( Title ) , 0, 1) + 
IF( ISpickval(Industry , ""), 0,1)



User-added image
CASE(Lead_Quality_Helper__c, 
1, IMAGE("/img/samples/stars_100.gif", "1 star"), 
2, IMAGE("/img/samples/stars_200.gif", "2 stars"), 
3, IMAGE("/img/samples/stars_300.gif", "3 stars"), 
4, IMAGE("/img/samples/stars_400.gif", "4 stars"), 
5, IMAGE("/img/samples/stars_500.gif", "5 stars"), 
IMAGE("/img/samples/stars_000.gif", "0 stars"))

If you want i see issue your org. Feel free to connect with me on my email id "amit.salesforce21@gmail.com"
 
Amit Chaudhary 8Amit Chaudhary 8
Please check Namespace is enable in your org or not . Please check below Trailhead FAQ
1) https://developer.salesforce.com/page/Trailhead_FAQ

I think my work is correct, but the challenge verification is still giving me an error.
If you think you've completed the challenge correctly, but you are still getting errors, make sure that you are using a fresh Developer Edition that does not have a namespace prefix. (What is a namespace prefix?) If you are still having trouble, use the “Share Feedback” button in the footer or on the right column to send a support request.


Please try to create  new developer org without domain name and namespace  with same formula field

let us know if this will help you

Thanks
Amit Chaudhary
This was selected as the best answer
Suzi Simmons 30Suzi Simmons 30
I created a new developer org, and retried this challenge, and it works perfectly.  When I use the developer org that redirects to another domain, the challengs does not pass.
So, that you!!
Suzi Simmons 30Suzi Simmons 30
I mean, THANK you