Skip to main content

Process Automation Specialist Superbadge - 2 & 3





Salesforce Trailhead - Process Automation Superbadge continued...

I took the validation rules created on the Lead object and tweaked them for Accounts.
  • Accounts have two address fields- billing and shipping - 4 total validation rules are needed.
  • The rules should apply to new records only, so the formula must be adjusted.
    5th validation rule! 

     HINT: I used "AND" and "ISNEW"
Next up, another validation rule, but this time, the validation rule is on a field within the account object. 

Number of Won Deals - field
After all of these validation rules, I was ready for a snack.  I hid my laptop under the blanket and called for mom.  She brought a bottle of milk, and, after a few sips, I was ready to create some fields.  4 out of the 6 new fields are roll up summary fields with various conditions.  The win percent utilizes 2 of the newly created fields in a formula. 
Highlight below for a hint: 
IF(Number_of_deals_c > 0, (Number_of_won_deals_c / Number_of_deals_c),0)

Bogged down by the "Call for Service" field?
Reference this forum from the Salesforce developer site.  The description of the field in the instructions could use additional elaboration...

It is a lovely chilly night, so, after Automating Accounts, I decided to snuggle up in a blanket and keep working.  If only I could speak enough words to ask mom for a hot chocolate...

Custom object - data type
I navigated to the object manager to create the Robot Setup custom object, ensuring that the data type was changed from "Text" to "Auto Number" using the display format and starting number specified in the instructions.  A master detail relationship was also added to the Robot Setup object to look up to Opportunity.  This addressed the cascading delete requirement.

Three fields need to be created of type text, date, and formula.
"Date" and "Notes" are simple, but the "Day of the Week" field is a little tricky.

To convert a date to the equivalent day of the week, you can either craft your own formula using CASE and MOD formula functions...or highlight the area below to see the Trailhead Baby method.
CASE(
MOD(Date__c - DATE(1900, 1, 7), 7),
0, "Sunday",
1, "Monday",
2, "Tuesday",
3, "Wednesday",
4, "Thursday",
5, "Friday",

6, "Saturday", "Error")

Before you start thinking that I am a super genius baby, please note that I received assistance with this formula from the Salesforce success community.  (A thread that dates back to 2010!)



Comments

  1. Hi,
    I am not able to pass challenge-2. I am getting error as :

    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.

    I have everything in my validation rules.

    ReplyDelete
    Replies
    1. A few things:
      Did you create validation rules for both Shipping and Billing Address?
      There should be 6 total validation rules on the account object.

      If you would like to share what you have, I'll take a look at them.

      Delete
  2. I'm having the same issues. I've been most of the day trying to get this to work.

    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.

    ReplyDelete
  3. Could you share the details of your validation rules?

    ReplyDelete
  4. I have the same error

    A validation rule did not prevent a new Account from being saved when Billing Country is blank and Billing State has three characters.

    Billing Country Validation Rule :
    NOT(OR(BillingCountry = "US", BillingCountry = "USA", BillingCountry = "United States", ISBLANK(BillingCountry)))

    Shipping Country Validation Rule :
    NOT(OR(ShippingCountry = "US", ShippingCountry = "USA", ShippingCountry = "United States", ISBLANK(ShippingCountry)))

    Billing State Validation Rules :
    OR(
    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:PR", BillingState))
    )

    Shipping State Validation Rule :
    OR(
    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:PR", ShippingState))
    )

    Do Not Change Name :
    IF(ISCHANGED(Name)&&(ISPICKVAL(Type,'Customer-Direct')||ISPICKVAL(Type,'Customer-Channel')), true, false)

    Please Help Me. :)

    ReplyDelete
    Replies
    1. I have something a little different for the validation rules... This thread should be helpful: https://developer.salesforce.com/forums/?id=9060G000000BgL3QAK

      Delete
    2. Thanks TB for all the help. The link you posted does not work.

      Delete
    3. odd. Perhaps the thread was archived by Salesforce. I am sure that you can find it or something similar by googling.

      Delete
    4. @Gustavo I'm facing the same error.Can you please tell me how did you solve the error?

      Delete
  5. I quadruple checked all my new roll ups, formulas, etc and I am still receiving this same error below.

    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.

    Any thoughts?

    ReplyDelete
    Replies
    1. hmmmm Not off the top of my head, but I'm happy to take a peek at what you have. Want to send some screenshots? rebecca@capstorm.com

      Delete
  6. Hi,

    I am getting this error. "Challenge Not yet complete... here's what's wrong:
    Please check the custom fields on the Account object. Not all custom fields were found."

    I have checked everything and the API names are correct. All the custom fields exist. The formulas are correct. I do not understand the error now

    ReplyDelete
    Replies
    1. Could you share a bit more about what you have?

      Delete
    2. I also face the same issue but i create a new playground for that and then it's successfully completed!!

      Delete
    3. i am also facing the same issue please help what can i do .
      i recheck again and again all the custom fields are there.

      Delete
  7. Hi. I resolved it. The issue was that all the fields were not visible on the page layout.
    Thanks. Your blogs help me a lot.

    ReplyDelete
    Replies
    1. can you tell how to check if they are visible on the page layout or just explain what page layout you are talking about.

      Delete
  8. Challenge Not yet complete... here's what's wrong:
    Please check the custom fields on the Account object. Not all custom fields were found.
    2. Automate Accounts
    Create validation rules and account formula fields as specified in the business requirements. Use the following field names.



    For this metric or field, Use this Field Name

    Number of deals, Number_of_deals__c

    Number of won deals, Number_of_won_deals__c

    Last won deal date, Last_won_deal_date__c

    Deal win percent, Deal_win_percent__c

    Amount of won deals, Amount_of_Won_Deals__c

    Call for Service, Call_for_Service__c

    ReplyDelete
    Replies
    1. Number_of_won_deals__c error check spelling i want sol sir

      Delete
  9. Hi,

    In step 2, I have the following 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.NullPointerException: Attempt to de-reference a null object

    Please someone can help me?
    Thank in advance

    ReplyDelete
  10. Hi,


    I have the error below:

    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, Shipping/Billing Address is incorrect: []

    my validation:

    OR (ISBLANK( BillingCountry),
    BillingCountry <> 'US',
    BillingCountry <> 'USA',
    BillingCountry <> 'United States',
    AND(ISBLANK( BillingState),
    LEN(BillingState) !=2))

    ReplyDelete
  11. I have the error below

    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, Shipping/Billing Address is incorrect: []

    my validation

    OR (ISBLANK( BillingCountry),
    BillingCountry <> 'US',
    BillingCountry <> 'USA',
    BillingCountry <> 'United States',
    AND(ISBLANK( BillingState),
    LEN(BillingState) !=2))

    ReplyDelete
    Replies
    1. You should have 4 validation rules related to the address.

      Delete
  12. Hello,

    There could be many reasons and for each issue , debug logs can really help to dig out the root cause.
    I was able to fiund in my case through logs and fixed the issue with below validations for shipping country.

    Error: A validation rule did not prevent a new Account from being saved when Shipping Country is blank and Shipping State has three characters.

    Solution: NOT(OR(ShippingCountry= 'USA', ShippingCountry= 'United States', ShippingCountry= 'US', ShippingCountry= null)) || LEN(ShippingState) <> 2

    same for BillingCountry as well.

    Thanks
    Dax

    ReplyDelete
  13. Hello,

    There could be many reasons and for each issue , debug logs can really help to dig out the root cause.
    I was able to fiund in my case through logs and fixed the issue with below validations for shipping country.

    Error: A validation rule did not prevent a new Account from being saved when Shipping Country is blank and Shipping State has three characters.

    Solution: NOT(OR(ShippingCountry= 'USA', ShippingCountry= 'United States', ShippingCountry= 'US', ShippingCountry= null)) || LEN(ShippingState) <> 2

    same for BillingCountry as well.

    Thanks
    Dax

    ReplyDelete
  14. I'M Having the error......Challenge Not yet complete... here's what's wrong:
    A validation rule did not prevent an Account's name from being changed when Type is 'Customer - Direct'.

    ReplyDelete
  15. have the error below

    Challenge Not yet complete.... here's what's wrong:
    A validation rule did not prevent an Account's name from being changed when Type is 'Customer - Direct'.


    please hell me to solve this error

    ReplyDelete
  16. Challenge Not yet complete... here's what's wrong:
    A validation rule did not prevent a new Account from being saved when Billing Country is blank and Billing State has three characters.

    ReplyDelete
  17. 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.

    getting this error, i checked... everything seems fine.
    Can anyone help??

    ReplyDelete
  18. Hi How do we create a master detail relationship with the oppurtunity object since this relationship with a particular field is known but how to build master detail relationship on a custom object,in step 3

    ReplyDelete
  19. Challenge Not yet complete... here's what's wrong:
    A validation rule did not prevent an Account's name from being changed when Type is 'Customer - Direct'.
    can anyone help me with this.

    ReplyDelete
  20. Challenge Not yet complete... here's what's wrong:


    A new Opportunity with a 'Prospecting' stage for a 'Prospect' Account did not successfully create a Task for the Account owner with the Subject 'Send Marketing Materials.(step5)

    ReplyDelete
  21. Challenge Not yet complete... here's what's wrong:


    A new Opportunity with a 'Prospecting' stage for a 'Prospect' Account did not successfully create a Task for the Account owner with the Subject 'Send Marketing Materia

    ReplyDelete
  22. step5
    Challenge Not yet complete... here's what's wrong:


    A new Opportunity with a 'Prospecting' stage for a 'Prospect' Account did not successfully create a Task for the Account owner with the Subject 'Send Marketing Materials

    ReplyDelete
  23. Hi im having an error.....Challenge Not yet complete... here's what's wrong:
    The formula on the 'Call for Service' field did not evaluate to 'Yes' when the account's opportunity has a close date of greater than 2 years in the past.

    ReplyDelete
  24. Process Automation Specialist Automate Accounts is error (Please check the custom fields on the Account object. Not all custom fields were found) plz help mee broo

    ReplyDelete
    Replies
    1. i am also facing the same issue please help if your problem was resolved.

      Delete
  25. i am facing the issue Please check the custom fields on the Account object. Not all custom fields were found. but i have rechecked all the fields again and again. can you please help

    ReplyDelete

Post a Comment

Popular posts from this blog

Service Cloud Specialist Superbadge - 4,5,6,7

Part of doing the Service Cloud Specialist superbadge is trying new things, so I am putting up picture of new things that I've tried recently.  One of my favorite new things this week was taking a shower with my whole block collection.  Mom put me in the shower, and I sneaked out to grab the block bin and dumped it in.  I'm concerned to share photos because of the slight nudity, however, I can assure you that it was a glorious adventure.  Instead, I'll share my favorite Saturday new thing- walking to the coffee shop for a sprinkle donut!  Back to the superbadge... Challenge 4 Case Routing If you haven't taken the Onmi Channel module yet, now is a good time! I kept that particular module open one on screen while I walked through this step.  It is hard to give many hints about this step without giving away too many details - so - the best advice is to read through the challenge and label each step with the corresponding Salesforce term.  (IE - "The...

Business Administration Specialist Superbadge- 3 & 4

This afternoon, I added a genius wig in an attempt to look a little older and more experienced.  The free lemonade offer worked!  I made two dollars today!  A huge thank you to Jocelyn Fennewald , Salesforce MVP, for pointing out the "remove all columns" option within the report creator.  When you start a create a new report, simply click to start with a clean screen.  If you are familiar with report and dashboards, this challenge should only take 30 or so minutes to complete.  Below are tips and gotchas for each report / dashboard.  If you need more help, leave a comment! Reports Accounts by Market To create the "Market" row grouping, use a bucket field. Make sure that the correct date range is selected. High Value Residential  This report includes: 1 filter, 1 grouping, and 1 summarized field.  Rated Accounts by State The record count for state and account rating are automatically added. Note the filter.  ...

Service Cloud Specialist Superbadge - 1,2,3

A confession - I know next to nothing about service cloud.  While I was excited that a new superbadge was available, it made me a little nervous that I had to do all of the prerequisites and tackle new things like macros.  New things - new year - let's get started! (Right after I finish guitar practice) If you are also a service cloud novice, the Omni-Channel Basics is a crucial prerequisite even though it is not officially required. Challenge 1 App Appearance  This, like all superbadges, requires a careful read through the instructions prior to any clicking.  I found it helpful to take a separate notebook and write down the steps that I would need for each challenge step - for example -  My rough notes for challenge 1: Create 2 profiles  Tweak service Console 3 new items on utility bar Allow access for new profiles Create User  Beware - After editing the service console, you might have to edit the new profiles.  I found i...