Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

#Trailhead Challenges2,417 discussing

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies.
Under: Advanced Formulas (Badge)

 

Level Up with Advanced Formulas

 

YOUR CHALLENGE

 

Create a formula that shows where an Opportunity is in the pipeline.

 

Create a formula field that classifies an Opportunity as either “Early”, “Middle”, or “Late”. This formula field should use TODAY() to calculate what percentage of the time between an opportunity’s CreatedDate and CloseDate has passed, and label the opportunity accordingly.

  • This formula should be on the Opportunity object
  • This formula should be named 'Opportunity Progress' with the resulting API name Opportunity_Progress__c
  • This formula should return 'Early' if less than or equal to 25% of an opportunity has passed
  • This formula should return 'Middle' if between 25% and 75% of an opportunity has passed
  • This formula should return 'Late' if more than 75% of an opportunity has passed
  • This formula should reference a helper formula field, also on the Opportunity Object, with the type Percent and the name Percent Completed
  • Percent Completed should return the percentage of the time that has passed between an opportunity’s CreatedDate and CloseDate
Challenge not yet complete in My Trailhead Playground 5

 

The 'Opportunity_Progress__c' formula field does not exist or is not of type 'Number'

 

 

 

Helper formula I used for: Percent Completed: “It works!”

 

((TODAY() - DATEVALUE(CreatedDate))

 

/((TODAY() - DATEVALUE(CreatedDate)) + ( CloseDate - TODAY())))

 

Problem they want the formula behind the “Opportunity Progress” field to have a Number as the data type, but it returns TEXT: “Early”, “Middle”, and “Late”.

 

This formula is the one I changed to, so I could use the data type – Number, but I still get the error message above.

 

IF(Percent_Completed__c <= 0.25, 1,

 

IF(Percent_Completed__c  >= 0.75, 3,

 

2) )

 

I changed the return data type to Text, so it would the return the “Early”, “Middle”, and “Late” that they requested, but I still get the error, which makes some sense, since I don’t have a number being returned?

 

 
0/9000

The case is related to an opportunity which has quotes attached. I am struggling to build the formula because you can't use a roll-up on a cases because they are a child object 

 

 

 

#Trailhead Challenges

3 answers
  1. Ajaypreet Singh Saini (Grantbook) Forum Ambassador
    Feb 26, 10:10 PM

    Hey @melissa vaughn, try creating a rollup field on Opportunity first to count the quotes attached to the opportunity. 

    As you have, in your org relationship of a case to an opportunity, create a formula field on Case to pull this rollup count value of quotes from related opportunity record

0/9000

 I need to mask the standard email field in Salesforce Sales Cloud to display it in the following format: n******@gmail.com

. Is there any standard functionality in Salesforce Sales Cloud that allows this, or does Salesforce provide any data object for it without creating a custom solution?  

 

#Trailhead Challenges  #Trailhead  #Sales Cloud  #Service Cloud  #Salesforce Developer  #Salesforce Admin  #Security  #CRM Configuration

3 answers
  1. Feb 28, 8:24 AM

    Hi, @Nilisha Patil

     

    Salesforce Sales Cloud does not provide a built-in standard functionality or data object specifically designed to mask the standard Email field (e.g., displaying it as n******@gmail.com) directly within the platform's UI or data structure without custom development. The standard Email field on objects like Contact, Lead, or User is a simple text field intended to store and display email addresses in plain text, and Salesforce does not offer native masking or obfuscation options for it out of the box. 

     

    Since you are looking for a solution without creating a fully custom implementation, you can use the following approach: 

     

    1. Create a Formula field (for example: Masked_Email__c) on the Contact or Lead object to display a masked version of the Email field. 

    2. Formula example:

    LEFT(Email, 1) + "******" + RIGHT(Email, LEN(Email) - FIND("@", Email) + 1)

     

    This would transform name@gmail.com into n******@gmail.com

     

    Sincerely, 

    Mykhailo Vdovychenko 

    Bringing Cloud Excellence with IBVCLOUD OÜ

0/9000

ALL the code: 

 

AND ( 

 

    AND( 

 

ProductCode__c  =  "CA-38",  

  

 SUM (Amount__c)  > 0  

 

)  

 

 

        AND(  

ProductCode__c  =  "AD-Y-11", 

 ProductCode__c  =  "AD-Y-12",  

ProductCode__c  =  "AD-Y-13", 

 ProductCode__c  =  "AD-Y-14" , 

 NOT (    SUM (Amount__c)  > 0   ) 

 ) 

 

)

Erreur de formule

 

Hi team, 

Someone to help me.  

I want a rule that prevents the sum of specific products from being equal to zero. 

 

 

 

#Trailhead Challenges

10 answers
  1. Feb 26, 9:49 PM

    @Ohou Jean-Luc Soboh You'll need to create a Flow to accomplish this, as a formula or validation rule alone can't retrieve specific product records and sum their amounts. In the Flow, use the **Get Records** element to fetch the amounts for multiple products, aggregate them, and check if the total exceeds zero.

0/9000
Hi, When i am trying to complete my validation for the challenge getting error as : 

 

The validation rule does not reference the account Shipping Postal Code field .

 

 I have created the validation rule on my contact object and using the formulae as AND(

 

NOT(ISBLANK(AccountID)),

 

MailingPostalCode != Account.ShippingPostalCode

 

)

 

Challenge :

 

To complete this challenge, add a validation rule which will block the saving of a new or updated contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).

 

Name the validation rule Contact must be in Account ZIP Code

 

A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be saved

 

The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)
0/9000
5 answers
0/9000

hi Experts ,  

 

 I want to create a list view that displays all the accounts where my team members, who report to me, are added as Account Team Members. This will give me a clear view of the accounts associated with my team.  

 

Please advise how can i achieve this using any custom formula field or anything else ? 

 

#Trailhead Challenges  #Trailhead

0/9000

I completed in a playground the Trailhead: 

Unlock Your Data with Data CloudCreate a Data Stream in Data CloudAdd and Map a Formula Field

 

The verification said I did everything right. When I go to the Data Explorer, I can view Data Lake Objects, but not Data Model Objects. 

 

For any object I select, I do get: 

 

Something's not right with the query. Check the columns or filter and try again. TraceId: eceeaa94e14e382f

 

I tried removing colums, no avail, same error. There are no filters! 

 

#Trailhead Challenges

6 answers
  1. Feb 17, 9:38 AM

    @Arnab Mukherjee I wasn't really able to solve that specific issue. I created a new playground, disconnected the old Data Cloud Playground, recreated a new Data Cloud Playground. The specific Data Explorer issue still appears, but other issues went away and I was able to complete the Trailhead (Data Explorer not strictly needed, but it was suggested in the Trailhead to check results beyond trailhead validation).

0/9000

The Case validation rule named ‘CASE001_Engineering_Req_Numeric’ is not set to display on the Engineering Req Number field. I am not able to find Engineering Req Field, not able to find how to find formula to restrict the Engineering Req Number field (API name EngineeringReqNumber__c) to numeric values if it is populated

 

 

#Trailhead Challenges

9 answers
0/9000

I have created the candidate and position look-up relationship for Job Applications object and gave the permissions as per requirement , but still error has popped up. This is regarding the Data Security Module -Control Access to Fields 

 

#Trailhead Challenges

12 answers
  1. Jan 20, 6:58 AM

    Hi , 

     

    I was able to figure it out. First I had to install this package "

    04t0P000000N9rs"

    I did it in my current environment and had to remove all permission set groups and delete the permission set and the previous 'Job Application' object I created since the data was missing because I was missing the data package ( I am sure it would work if you started it in a new environment and restarted the challenge. )

     

    Since the package comes with its own Candidate and Position fields, you have to go into each one of these within the Job Application Object under Field & Relationships -> Select Candidate ->Edit - > change field type - > Select lookup relationship -> Next -> Next-> (VERY IMPORTANT) Select Read Access and unselect Edit Access -> Save

     

    Now do the same for Position.

     

    After that just follow the Challenge Promp.

     

    Set up ' Manage Job Application Permission Set'

     

    Go to Object

     Settings under 'Job Applications'

    It should look like this and you're done!

     

    https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000KBtuw

0/9000