0

Im trying to write my first validation rule.

  1. If 'fruit' is one of the selections from (multi select) picklist A.
  2. Display the following fields:
  • Apple
  • Orange
  • Pear
  1. Otherwise do not display these fields.

IF(PicklistA CONTAINS(fruit), Apple AND Orange AND Pear = true)

Can someone advise me where I'm going wrong?

3
  • 2
    I don't think you need a validation rule here. A validation rule prohibits a user from saving invalid data, not what information is displayed in the UI.
    – sfdcfox
    Commented Oct 20, 2021 at 14:02
  • ah ok - how can I control whether fields are displayed? if a validation rule is not suitable
    – h3110
    Commented Oct 20, 2021 at 15:28
  • 1
    the relevant formula operator is INCLUDES for multi-select picklist
    – cropredy
    Commented Oct 20, 2021 at 19:23

1 Answer 1

1

You can achieve this via Custom Lightning record page with component visibility feature for your custom object which has the fields Piclist A and Apple, Orangeand Pear.

You can refer this trailhead which will help you to done this.

Please let me know if it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .