You need to sign in to do that
Don't have an account?
Thomas Smith 61
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Contract_End_Date__c]: [Contract_End_Date__c]
This for -
How to Code for Creating Validation Rule Challenge?
Rule needed - 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)
What I have:
AND( NOT(ISBLANK(AccountId)), MailingPostalCode != Account.ShippingPostalCode )
Error I am getting-
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: REQUIRED_FIELD_MISSING, Required fields are missing: [Contract_End_Date__c]: [Contract_End_Date__c]
Unsure - I have the object Contract_End_Date__c (I have put it in ojects as a field for Account, Contact and Contract put it in all because i couldnt figure out the why?) and it is Required Field.
Thank you in advance,
Tom Smith
How to Code for Creating Validation Rule Challenge?
Rule needed - 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)
What I have:
AND( NOT(ISBLANK(AccountId)), MailingPostalCode != Account.ShippingPostalCode )
Error I am getting-
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: REQUIRED_FIELD_MISSING, Required fields are missing: [Contract_End_Date__c]: [Contract_End_Date__c]
Unsure - I have the object Contract_End_Date__c (I have put it in ojects as a field for Account, Contact and Contract put it in all because i couldnt figure out the why?) and it is Required Field.
Thank you in advance,
Tom Smith
Salesforce is trying to insert the data on click of the challenge .. that is causes an conflict with this validation
All Answers
Salesforce is trying to insert the data on click of the challenge .. that is causes an conflict with this validation
I keep looking and did not miss making one but when I look at the Objects under Accounts, Contacts, and Contracts - they have under Field & Relationships Contract_End_Date__c from previous Traning Trail -
It looks like it is saying that it can find that Required Field?
thanks
Thanks for the Advice - I just when ahead a deleted all Contract_End_Date__c from all Objects and it Worked - 15mins turned into 2.5hrs..
uncheck the required this field,
it will work