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
ramkramk 

Validation Rule

How to create a valiation rule:: i am new to sfdc

 

If the field “A” is populated then the field “B” must be blank OR if “B” is populated then “A” must be blank.  Error message should display below the "Attn" attribute; error message should read:"Only A or B may be filled in, but not both"

 

Noam.dganiNoam.dgani

AND(NOT(ISBLANK(A)),NOT(ISBLANK(B)))

Steve :-/Steve :-/

You could also do somethinf like:

 

IF(ISBLANK(Field_A), 0,1 ) +
IF(ISBLANK(Field_B), 0,1 ) > 1