Skip to main content TDX, the developer conference for the AI agent era is happening now. Watch live on Salesforce+ for exclusive digital content, a revolutionary keynote, and more.

#Trailhead Challenges2,492 人正在讨论

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies.
Hi All,

 

Is it possible to capitalize the first letter in a field?  The field is First Name.  I don't want to enforce this, but rather upon tabbing off the field, capitalize the first letter.  Similar to the Phone # fields, which automatically format.

 

Possible?  Thanks!
25 个回答
  1. 2013年11月7日 20:20
    Hey Steve,

     

    With the assumption that you have Workflow Rules on your edition(with ref. to old questions), here you go:

     

    • Setup | Create | Workflows & Approvals | Workflow Rules.

    • New Rule.

    • Select the Object.

    • Evaluation Criteria : created and every time it's edited.

    • Rule Criteria : formula evaluates to true.

    • Formula :

    AND(

     

        NOT(ISBLANK( FirstName )),

     

        OR(

     

            ISNEW(),

     

            ISCHANGED( FirstName )

     

        ),

     

        LEFT( FirstName , 1) <> UPPER(LEFT( FirstName , 1))

     

    )

    • Save & Next.

    • From under Immediate Workflow Actions , click Add Workflow Action to select Field Update.

    • Select the Field to Update : FirstName.

    • Select User a Formula to Set the new Value.

    • Click Show Formula Editor.

    • Formula :

    UPPER(LEFT( FirstName , 1)) &

     

    MID( FirstName , 2, LEN( FirstName ))

    • Save

    • Done
    • Activate

    Best,

     

    Deepak
0/9000

I am on this challenge and unable to move forward. I have corrected mapped the formula field Is US Based to the corresponding in Lead but it somehow doesn't save the mapping. Attached is the screen recording. 

 https://trailhead.salesforce.com/content/learn/projects/create-a-data-stream-in-data-cloud/add-and-map-a-formula-field?trail_id=unlock-your-data-with-data-cloud

#Trailhead Challenges

0/9000

Hello, I'm working on Flows Training - Hands-on Challenge - bullet 3 (Add an Update Records element....)  In my Playground - Flow Builder - , there is no such field as "Id", as per the instruction.    Add an Update Records element....

  • Filter Account Records:
    • Field: Id
    • Operator: Equals
    • Value: accountID
1 个回答
  1. 3月4日 21:33

    Hi, @Ellen Venkitaswaran

     

    1. Create an Autolaunched FlowHi, 1. Create an Autolaunched Flow2. Click toolbox icon and create New Resource:3.2. Click toolbox icon and create New Resource:2.jpg

    3. Create a resource: 

     

    • Resource Type: Variable
    • API Name: accountID
    • Data Type: Text
    • Available for input: checked

    3.jpg

    • Resource Type: Formula
    • API Name: WeekFromToday
    • Data Type: Date
    • Formula: TODAY() + 7

    4.jpgFinal view of your Resources list:5.jpg

    4. Add an Update Records element: 

    click on the "+" icon in your flow palette and select Update Records

     

    • Label: Set Type to Customer
    • API Name: Set_Type_to_Customer
    • How to Find Records to Update and Set Their Values: Specify conditions to identify records, and set fields individually
    • Object: Account
    • Filter Account Records:
      • Field: Id
      • Operator: Equals
      • Value: accountID
    • Set Field Values (remove any fields not mentioned here):
      • Field: Type
      • Value: Customer - Direct

    6.jpg

     

    Sincerely, 

    Mykhailo Vdovychenko 

    Bringing Cloud Excellence with IBVCLOUD OÜ

0/9000

I can't figure out the hands-on task for trailhead Implement Best Practices.  "Determine the formula that requires either the email or phone field to be populated when a lead is created or when it is edited and either the email or phone field has been changed. Hint: use the ISNEW, ISCHANGED, and ISBLANK functions."  and(  OR(  ISNEW(),  ISCHANGED(Email)  ),  ISNEW(),  ISCHANGED(Phone)  )

 

returns challenge check error "We were able to create a new lead without an Email or Phone populated."    

1 个回答
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    3月3日 23:32
0/9000
13 个回答
  1. 2024年3月11日 10:32

    Thank you for reaching out. I apologize for any inconvenience regarding the access issue. I'll ensure to look into it promptly. Rest assured, I'll utilize the provided system admin access to investigate the matter further. Should I require any additional information, I'll be sure to reach out to you. Thanks again for your cooperation and patience.

     

    Best regards,

0/9000
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 个回答
  1. Ajaypreet Singh Saini (Grantbook) Forum Ambassador
    2月26日 22:10

    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

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 个回答
  1. 2月26日 21:49

    @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