You need to sign in to do that
Don't have an account?
creating validation rules error??????
hello all,
i've been working through salesforce trialhead modules and up until the error i came across today i can usually figure out my mistake. i'm on the creating validation rules exercise which is under "formulas & validation" module. i've started over twice and continue to get this same error. can anyone enlighten me on what i'm doing wrong? Here's the error - 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: REQUIRED_FIELD_MISSING, Required fields are missing: [MailingPostalCode__c, ShippingPostalCode__c]: [MailingPostalCode__c, ShippingPostalCode__c]
i've been working through salesforce trialhead modules and up until the error i came across today i can usually figure out my mistake. i'm on the creating validation rules exercise which is under "formulas & validation" module. i've started over twice and continue to get this same error. can anyone enlighten me on what i'm doing wrong? Here's the error - 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: REQUIRED_FIELD_MISSING, Required fields are missing: [MailingPostalCode__c, ShippingPostalCode__c]: [MailingPostalCode__c, ShippingPostalCode__c]
The MailingPostalCode and ShippingPostatCode are standard fields so you don't need to create custom ones (ending in __c).
Your validation should look something like this:
AND(
NoT(ISBLANK(AccountId)),
MailingPostalCode !=Account.ShippingPostalCode)
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
All Answers
[MailingPostalCode__c, ShippingPostalCode__c]
Can you post a screen print if you did?
Thx
Also, based on the error, you must have a trigger, workflow, process builder or something that is doing an insert thus "Insert failed".
You may want to check and disable those first
Thx
Below is the link for the Trialhead exercise.
https://developer.salesforce.com/trailhead/force_com_dev_beginner/point_click_business_logic/validation_rules
I'm pretty sure there isn't a trigger, workflow or process builder in place doing any type of insert. I was assuming that it's referring to the manuel input of the zipcode data from the screen i entered. that's what didn't make any sense to me. Thanks for all you help
The MailingPostalCode and ShippingPostatCode are standard fields so you don't need to create custom ones (ending in __c).
Your validation should look something like this:
AND(
NoT(ISBLANK(AccountId)),
MailingPostalCode !=Account.ShippingPostalCode)
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks