• Kelly Tetlock
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,
I am very new to Salesforce and have been struggling with writing a validation rule for a week now and am getting nowhere fast!  Essentially I want 3 fields to become required when data is entered into another field.  When a new Contact is created and an Email address is added to the Contact I want a picklist that will capture the Source of the Email, a date field that will capture when the Email was obtained and a text field that will capture who obtained the Email to become mandatory. On a net new record the rule should only run if an Email address is added.  To make matters even more difficult I will also have Contacts in my system that have been imported from a legacy CRM system.  These Contacts may not have an existing Email address.  I also want this rule to run if an Email is added to one of these existing records, or if the Email address on the existing record is changed and the three required fields I note above are blank.
I started out small with just the following.  The appropriate error message does show, but when I choose a picklist value and try to save the error message won't go away and won't let me save the record.

AND
(OR(ISNEW(),(ISCHANGED(Email)),
ISBLANK(TEXT(Email_Source__c))
))

As I've mentioned, I'm very new to Salesforce and am still trying to understand how this validation function works. Any suggestions would be appreciated.
Hi,
I am very new to Salesforce and have been struggling with writing a validation rule for a week now and am getting nowhere fast!  Essentially I want 3 fields to become required when data is entered into another field.  When a new Contact is created and an Email address is added to the Contact I want a picklist that will capture the Source of the Email, a date field that will capture when the Email was obtained and a text field that will capture who obtained the Email to become mandatory. On a net new record the rule should only run if an Email address is added.  To make matters even more difficult I will also have Contacts in my system that have been imported from a legacy CRM system.  These Contacts may not have an existing Email address.  I also want this rule to run if an Email is added to one of these existing records, or if the Email address on the existing record is changed and the three required fields I note above are blank.
I started out small with just the following.  The appropriate error message does show, but when I choose a picklist value and try to save the error message won't go away and won't let me save the record.

AND
(OR(ISNEW(),(ISCHANGED(Email)),
ISBLANK(TEXT(Email_Source__c))
))

As I've mentioned, I'm very new to Salesforce and am still trying to understand how this validation function works. Any suggestions would be appreciated.