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
Joe KatzmanJoe Katzman 

Trailhead Formula & Validation (3/3) Issue - My Dev instance missing key APIs/Fields?

The challenge begins:
 
"To complete this challenge, add a validation rule which will block the insertion of a 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)."

Here my problem: these fields do not exist within my developer edition. The only thing I have is MailingAddress, whereas this challenge asks for a postal code field. Other documentation (https://help.salesforce.com/HTViewHelpDoc?id=fields_useful_validation_formulas_contact.htm&language=en_US) refers to nonexistent fields like MailingStreet and MailingCountry. Or at least, they're nonexistent for me. Here's a screenshot:

User-added image

I can't create the missing fields myself, because then the API name would be "MailingPostalCode__c" etc. for custom fields, and that would be wrong.

Is my dev implementation flawed somehow? Any idea how I might fix that?
Best Answer chosen by Joe Katzman
Himanshu ParasharHimanshu Parashar
Hi Joe,

There is nothing wrong with your dev org. Mailing Address is a compound field which is managed by SFDC internally.

User-added image

Here is the details documenation about compound fields

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_address.htm

So if you will put MailingPostalCode in validation rule it will not throw an error.

Makes sense?



Thanks,
Himanshu

All Answers

Himanshu ParasharHimanshu Parashar
Hi Joe,

There is nothing wrong with your dev org. Mailing Address is a compound field which is managed by SFDC internally.

User-added image

Here is the details documenation about compound fields

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_address.htm

So if you will put MailingPostalCode in validation rule it will not throw an error.

Makes sense?



Thanks,
Himanshu
This was selected as the best answer
Himanshu ParasharHimanshu Parashar
User-added image

1. First Click on Validation rule in sidemenu
2. Select postal code from insert field popup.
Joe KatzmanJoe Katzman
Thanks! I needed both of your posts for this answer, because I wasn't looking in the right place. Which is why I wasn't seeing the applicable fields.

If people look in the right place (per your second graphic), instead of wondering "let me check if I see that field first" - then it comes up in the interface and of course there are no problems. If you hadn't added that 2nd post, I'd still be stuck!
Himanshu ParasharHimanshu Parashar
Hi Joe,

Yes I realized that later that is why I captured the screenshot to make it clear :)